Update Linux Introduction

2024-06-07 16:28:25 +02:00
parent 28b6196434
commit 6c6a2915ee

@ -1,62 +1,50 @@
## Documentation pages: ## Documentation pages:
Merlin usage: https://lsm-hpce.gitpages.psi.ch/merlin6/introduction.html Merlin usage: https://lsm-hpce.gitpages.psi.ch/merlin6/introduction.html
Linux cheat sheet (one of many): https://www.guru99.com/linux-commands-cheat-sheet.html Linux cheat sheet (one of many): https://www.guru99.com/linux-commands-cheat-sheet.html
## Useful keys in the Terminal ## Useful keys in the Terminal
`|` , "pipe" connects output of one command to another (see example 'grep' below) `|` , "pipe" connects output of one command to another (see example 'grep' below)
`~` , "tilde" stands for "home" directory `~` , "tilde" stands for "home" directory
`tab` , "tab" autocompletion of paths and commands in the terminal. Extremely useful to check if the command is actually valid. `tab` , "tab" autocompletion of paths and commands in the terminal. Extremely useful to check if the command is actually valid.
`ctrl + c` , **not** "copy", it actually kills a process in the terminal.If you want to copy use middle mouse or mousepad-specific features. `ctrl + c` , **not** "copy", it actually kills a process in the terminal.If you want to copy use middle mouse or mousepad-specific features.
`ctrl + Z` , then `bg ` puts a running process in the terminal into the background , same as starting a process with `&`. Example: `relion & ` `ctrl + Z` , then `bg ` puts a running process in the terminal into the background , same as starting a process with `&`. Example: `relion & `
## Some useful commands in the Terminal: ## Some useful commands in the Terminal:
- listing the content of the current working directory: `$ ls -lrt ` - listing the content of the current working directory: `$ ls -lrt `
- changing directory: `$ cd /path/to/dir` - changing directory: `$ cd /path/to/dir`
- creating a directory: `mkdir /path/to/dir` - creating a directory: `mkdir /path/to/dir`
- removing a directory: `rm -r /path/to/dir` - removing a directory: `rm -r /path/to/dir`
- copying a directory or file: `cp -r (-r only for folders) /path/to/file /destination/of/file` - copying a directory or file: `cp -r (-r only for folders) /path/to/file /destination/of/file`
- editing files: `emacs <name-of-file>` or `nedit <name-of-file> `or `vim (advanced) ` - editing files: `emacs <name-of-file>` or `nedit <name-of-file> `or `vim (advanced) `
- showing file contents in the terminal: `more <name-of-file>` - showing file contents in the terminal: `more <name-of-file>`
- showing the size of folders/files in one specific folder: `du max-depth 1 -h ` - showing the size of folders/files in one specific folder: `du max-depth 1 -h `
- searching for a specific pattern in a file: `more <name-of-file> | grep 'pattern' ` - searching for a specific pattern in a file: `more <name-of-file> | grep 'pattern' `
## ~/.bashrc file ## ~/.bashrc file
- The ~/.bashrc file is similar to a "config" file that is executed every time that you open a new terminal. - The ~/.bashrc file is similar to a "config" file that is executed every time that you open a new terminal.
- Inside the ~/.bashrc file, paths, variables and user-specific settings can be edited (use any editor), after changing, the terminal needs to be closed and reopened in order to make changes available. - Inside the ~/.bashrc file, paths, variables and user-specific settings can be edited (use any editor), after changing, the terminal needs to be closed and reopened in order to make changes available.
- Examples that change the bashrc file: conda installations, cryosparc etc.. - Examples that change the bashrc file: conda installations, cryosparc etc..
## Personal user storage on Merlin (Ra)
Merlin storage documentation: https://lsm-hpce.gitpages.psi.ch/merlin6/storage.html ## Software
Ra storage documentation: https://hpc-sysadmins.gitpages.psi.ch/ra/storage.html ### Installations
Software can be used in two ways:
Most important info: 1. load the available software via a [Pmodule](Pmodules)
2. Install your software locally (in `/data/user/$username`)
- `/data/user/$username:` 1TB , no backup
- `/psi/home/$username:` 10GB , Backup To check, which executable you are actually running on and which version is running, you can do: `$ which python` or ` $ python --version`.
Data, Data Processing , Conda etc. should be in `/data/user/$username`, as it needs quite some storage, very important things that need to be backup-ed and are small go to `/psi/home/$username`
## Software
### Installations
Software can be used in two ways:
1. load the available software via a [Pmodule](Pmodules)
2. Install your software locally (in `/data/user/$username`)
To check, which executable you are actually running on and which version is running, you can do: `$ which python` or ` $ python --version`.