Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

1. Everything in Linux is a file including the hardware and even the directories.

2. # : Denotes the super(root) user


3. $ : Denotes the normal user
4. /root: Denotes the super users directory
/home: Denotes the normal users directory.
5. Switching between Terminals
Ctrl + Alt + F1-F6: Console login
Ctrl + Alt + F7: GUI login
6. The Magic Tab: Instead of typing the whole filename if the unique pattern for a
particular file is given then the remaining characters need not be typed and can be
obtained automatically using the Tab button.
7. ~(Tilde): Denotes the current users home directory
8. Ctrl + Z: To stop a command that is working interactively without terminating it.
9. Ctrl + C: To stop a command that is not responding. (Cancellation).
10. Ctrl + D: To send the EOF( End of File) signal to a command normally when you
see >.
11. Ctrl + W: To erase the text you have entered a word at a time.
12. Up arrow key: To redisplay the last executed command. The Down arrow key
can be used to print the next command used after using the Up arrow key
previously.
13. The history command can be cleared using a simple option c (clear).
14. cd : The cd command can be used trickily in the following ways:
cd : To switch to the home user
cd * : To change directory to the first file in the directory (only if the first file is a
directory)

cd .. : To move back a folder


cd - : To return to the last directory you were in
15. Files starting with a dot (.) are a hidden file.
16. To view hidden files: ls -a
17. ls: The ls command can be use trickily in the following ways:
ls -lR : To view a long list of all the files (which includes directories) and their
subdirectories recursively .
ls *.* : To view a list of all the files with extensions only.
18. Copying hidden files: cp .* (copies hidden files only to a new destination)
19. dpkg -l : To get a list of all the installed packages.
20. more: It is a filter for paging through text one screenful at a time.
Use it with any of the commands after the pipe symbol to increase readability.
e.g. ls -a |more

You might also like