Useful Linux command line tips
posted by Michael Olafusi , on ,
Linux has become extremely easy to administer. And can be administered using GUI applications or using the Command line Interface (CLI)
As a professional Linux administrator, you’ll have to know how to administer the OS via the CLI
Linux supports multi-tasking, several users using the OS simultaneously.
By default 7 users can work simultaneously (without anyone logging out). 6 Commandline users and 1 GUI user. To switch use CTRL + ALT + F1 (F2,F3,F4,F5,F6,F7) . CTRL+ALT+F7 takes you to the GUI one
From the GUI, you can always access the command line via “Terminal”
Below are very useful command line tips
Ctrl + A to mover the cursor to the beginning of command line
Ctrl + C to end a running program and return the prompt
Ctrl + D to log out of the current shell session, same as exit or logout
Ctrl + E to move cursor to the end of the command line
Ctrl + H to generate backspace character
Ctrl + L to clear the terminal
Ctrl + R to search command history
Ctrl + Z to suspend a program
Shift + PageUp or PageDown to scroll (browse buffer)
Tab to autocomplete command of filename
Tab Tab to show command completion possibilities
If you can’t remember a command but remember the first 2 or more letters, type them and press Tab twice. This will list all the commands that start with those letters.
If you can’t remember how to use a particular command, type man command e.g. man mkdir to read a comprehensive help file on using the command, mkdir.
If you need a quick help with using the options or syntax of a command, type command --help (double hypen). e.g. mkdir --help to get a quick help guide.
To get an easy to read manual (easier than man) on any command, type info command e.g. info mkdir
To get a short description of what a command does, type whatis command e.g. whatis mkdir
To get a list of commands for doing a particular task, type apropos task e.g. apropos text to get text manipulation commands/applications