IT group
HU Berlin | Department of Mathematics | IT Group | Allgemeines | Linux
Deutsch | English

Linux

These days, you can usually use Linux just as easily as Windows. The differences are mostly felt when working on the command line. If you need to use it, we have compiled a list of important commands for basic tasks.

Commands

cd

Changes the current directory. Either cd directory to change into the directory named directory or just cd to change into the home directory.

pwd

Print working directory. Shows where you currently are.

cp und mv

Copies and moves files, respectively. Warning: The target may be overwritten without confirmation!.

Examples:

cp Source TargetCopies fileSource into file target
mv Source Target_directory/Moves fileSource into the directory Target_directory
cp -r Source_dir/* Target_dir/Copies the contents of the directory Source_dir into the directory Target_dir

rm

Removes files and directories. Warning: The files deleted that way cannot be easily restored and there is no confirmation. Check your input carefully

Example: rm File — Deletes file File.

grep

Globally search a regular expression and print. Searches files or input with regular expressions. Example: grep -i Word File* — Searches all files beginning with Datei for the String Word case-insensitively.

mc

Friends of classical file managers (like Norton Commander) will find an adequate replacement in Midnight commander: