Overview of Linux commands and their descriptions ...
Help
| [command] --help |
outputs a short help text for the respective command |
| man [Command] |
shows the manual page of the command
|
Basic functions
| Command |
Description |
| alias |
Creates alias names for commands. |
| at |
Execute a command once at a specified time |
| batch |
Execute a command once when the system is not busy |
| cal |
Displays a calendar |
| clear |
Clears the console |
| comm |
Selects equal lines of the output/file |
| crontab |
Displays the user-specific cron table or opens it for editing |
| date |
Outputs the current date. |
| echo |
Outputs a text to the console. |
| env |
Outputs all environment variables. |
| expr |
Evaluate expressions. |
| find |
Searches the directory tree, starting from the current directory, for a file. |
| fold |
Breaks overlong lines |
| grep |
Searches for a string in a file, or a redirected output (echo test.txt | grep blafasel) |
| halt |
Shutdown of the system. |
| history |
Prints the entries in the history file of the user numbered |
| hostname |
Displays the name of the computer |
| init |
Change runlevel |
| join |
Concatenates lines of output |
| logout |
Log out from the console |
| nl |
Numbers the lines of the output |
| pr |
Converts texts for printing. |
| printenv |
Outputs all environment variables. |
| reboot |
Restart the system (like shutdown -r now) |
| rev |
Invert string |
| shutdown -r now |
Reboot the system (like reboot) |
| shutdown -h now |
Shut down the system |
| sleep |
Wait seconds |
| sort |
Sorts the output of programs, respectively files |
| startx |
starts the X-Window system, a graphical user interfacee |
| strings |
Extracts all (readable) strings from a file/input |
| sum |
Determines file length and checksum of a file |
| tee |
Doubles the output of a program (for simultaneous display on the screen and logging to a file) |
| type |
Displays the type of a file and the interpretation of the file name as a parameter |
| uniq |
Removes duplicate lines in a file |
| wc |
Counts letters, lines and words of the input. e.g. to count the number of files in a folder: ls -1 | wc -l |
Partition/Directory/File
| Command |
Description |
| badblocks |
Searches a partition for damaged blocks (BadBlocks) |
| basename |
Prints a file name without path information |
| cat |
Joins several files and prints the result |
| cd |
Switches to the user's home directory |
| cd [directory] |
Switches to the specified directory |
| cd .. |
Switches to the parent directory |
| cd / |
Switches to the root directory |
| cd - |
changes to the previous directory |
| chgrp |
change group membership of a file |
| chmod |
change access rights |
| chown |
change owner of a file |
| cmp |
Compares two files for matching |
| cp |
Copies files and directories |
| cpio |
Copies files to/from archives |
| dirname |
Prints only the path to a file |
| dd |
Copies partitions/file systems byte by byte, see Cloning, Copying, Image Tools |
| dumpe2fs |
Prints information about the file system on a partition |
| e2fsck |
Checks and repairs Linux ext2 file systems |
| e2label |
Assigns a label to a file system or prints the label |
| fdisk |
Creates and deletes partitions. Displays the current partition table |
| file |
Displays the file type of a file. |
| fsck |
Checks and repairs Linux file systems |
| head |
Prints the first lines of a file |
| hdparm |
Program for setting various parameters of a hard disk |
| less [file] |
like more but you can also scroll upwards |
| ln |
Creates a link to a file/directory |
| ls |
Displays the contents of the current or specified directory |
| mkdirhere |
Creates a directory hierarchy |
| mkdir |
Creates a new directory |
| mkdosfs |
Creates a Dos (FAT16 and FAT32) filesystem on the specified partition |
| mke2fs |
Creates an ext2 filesystem on the specified partition |
| mkfs |
Frontend to different filesystem creators |
| mkswap |
Creates a Linux swap partition on the specified partition |
| mount |
e.g.mount /mnt/cdrom Mounts a file system (a partition, disk..) into the directory tree (to a mountpoint) |
| more |
displays the contents of a file page by page (only downwards). |
| mv |
Moves files and directories (also renames) |
| pwd |
Displays the current directory |
| rm -rf [Verz] |
Deletes files and directories below [Verz]. |
| rmdir |
Deletes a directory |
| split |
Split file (e.g. for transport by mail or floppy disk) |
| tail |
Prints the last lines of a file |
| touch |
Changes the timestamp of files. If a file does not exist, it will be created with a size of 0 bytes. |
| tune2fs |
Program to set various parameters of the ext2 filesystem (e.g. maximum mount count) |
| umount |
Detaches a filesystem from the directory tree |
Network
| Command |
Description |
| ftp |
Opens an FTP session to the specified computer (FTP server) FTP : File Transfer Protocol |
| ifconfig |
shows the current IP address (like ipconfig in Windows) |
| ipchains |
tool to configure the kernel firewall |
| netdate |
time synchronization with a remote computer |
| netstat |
Prints information about network connections, routing tables |
| ping |
Sends small data packets to the given IP address and waits for a response, tool to check network connection |
| rcp |
Remote Copy. Copy function on a remote computer. |
| route |
create static routes |
| telnet |
opens a telnet session to the specified computer (remote control) |
| tty |
shows the device you are logged in with |
system
| Command |
Description |
| df |
Displays the memory usage of the partitions of the system, |
| du |
Shows the memory usage of individual directories e.g. for specific folders: du -sh * |
| free |
Shows the memory usage of the system. Divided into RAM and SWAP space. |
| kill |
Terminates the process with the given process ID (PID) |
| killall |
Kills all processes with the given name |
| killproc |
Kills the process whose executable file can be found in the given path |
| nice |
Sets the priority of a process |
| nohup |
Starts a program immune to SIGHUPs |
| pidof |
prints the PID(s) of the process with the given name |
| ps |
Displays all processes with their PID, the user ID of the executing user, the terminal ID etc. |
| pstree |
Displays all processes in a tree view |
| top |
Displays processes in a constantly updating list. The processes that need the most CPU time are shown at the top. |
| uptime |
Displays the uptime of the machine. The uptime is the time since the last reboot. |
Print
| Command |
Description |
| lpq |
Display print jobs |
| lpr |
Add print job to printer queue |
| lprm |
Delete print job |
| lptest |
Output test pattern for printer test (lptest | lpr) |
Search
| Command |
Description |
| find |
Extensive search tool e.g. find . | grep [file] searches starting from the current directory for [FILE]. |
| locate |
searches files using an index created by updatedb |
| updatedb |
Creates a search index over the whole file system for locate |
| whereis [program] |
Searches the binary (executable file), the source code and the man page of a program |
| which |
Specifies the first found path of a program in the path (echo /usr/local/apache/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:) |
User
| Command |
Description |
| chfn |
Change the user information of an AccountRoom-NumberWork-PhoneHome-Phone |
| chsh |
Change the login shell of a user account |
| exit |
Leave current session |
| finger |
Prints the login name, real name, terminal name, write status, idle time (time since last account use), login time, location, and office phone number of the specified user account. |
| groupadd |
Create a new user group |
| groupdel |
Delete an existing user group |
| groupmod |
Modify the data of an existing user group |
| groups |
Shows the group membership of a user |
| id |
own login name including group |
| last |
shows the last logins |
| login |
Log in as user |
| logname |
Returns the own login name |
| newgrp |
Change the current group |
| passwd |
Set or change the password of a user |
| su |
Open a new session with another account |
| sudo |
Execute command as root. |
| useradd |
Create a new user account |
| userdel |
Delete a user. |
| usermod |
Modify an existing user account. |
| who |
Prints the login names of the currently logged in users |
| whoami |
Prints the own login name |