Clone
7
Linux Introduction
assman_g edited this page 2024-06-07 16:31:44 +02:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Documentation pages:

Merlin usage

Linux cheat sheet

Bio pages

Useful keys in the Terminal

| , "pipe" connects output of one command to another (see example 'grep' below)

~ , "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.

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 &

Some useful commands in the Terminal:

  • listing the content of the current working directory: $ ls -lrt
  • changing directory: $ cd /path/to/dir
  • creating a directory: mkdir /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
  • 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 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'

~/.bashrc file

  • 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.
  • Examples that change the bashrc file: conda installations, cryosparc etc..

Software

Installations

Software can be used in two ways:

  1. load the available software via a Pmodule
  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.