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 user’s directory
/home: Denotes the normal user’s directory.
5. Switching between Terminals
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 user’s 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:
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:
18. ls -ll: Gives a long list in the following format
19. Using the rm command: When used without any option the rm command deletes the file or directory ( option –rf) without any warning. A simple mistake like rm / somedir instead of rm /somedir can cause major chaos and delete the entire content of the /(root) directory. Hence it is always advisable to use rm command with the –i(which prompts before removal) option. Also there is no undelete option in Linux.
20. Copying hidden files: cp .* (copies hidden files only to a new destination)
21. dpkg -l : To get a list of all the installed packages.
23. Use of ‘ > ‘ and ‘ >> ‘ : The ‘ > ‘ symbol ( input redirector sign) can be used to add content to a file when used with the cat command. Whereas ‘ >> ‘ can be used to append to a file. If the ‘ >> ‘ symbol is not used and content is added to a file using only the ‘>’ symbol the previous content of the file is deleted and replaced with the new content.
23. To count the number of users logged in : who |wc –l
24. cat: The cat command can be used to trickly in the following way:
25. To search a term that returns a pattern: cat <filename> |grep [pattern]
26. The ‘tr’ command: Used to translate the characters of a file.
28. more: It is a filter for paging through text one screenful at a time.
29. cron : Daemon to execute scheduled commands. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates.
30. fsck: Used for file system checking. On a non-journaling file system the fsck command can take a very long time to complete. Using it with the option -c displays a progress bar which doesn’t increase the speed but lets you know how long you still have to wait for the process to complete.
31. To find the path of the command: which command
32. Setting up alias: Enables a replacement of a word with another string. It is mainly used for abbreviating a system command, or for adding default arguments to a regularly used command
33. The du (disk usage) command can be used with the option -h to print the space occupied in human readable form. More specifically it can be used with the summation option (-s).
34. Two or more commands can be combined with the && operator. However the succeeding command is executed if and only if the previous one is true.
35. Surfing the net in text only mode from the terminal: elinks [URL]
36. The ps command displays a great more deal of information than the kill command does.
37. To extract a no. of lines from a file:
38. Any changes to a file might cause loss of important data unknowingly. Hence Linux creates a file with the same name followed by ~ (Tilde) sign without the recent changes. This comes in really handy when playing with the configuration files as some sort of a backup is created.
39. A variable can be defined with an ‘=’ operator. Now a long block of text can be assigned to the variable and brought into use repeatedly by just typing the variable name preceded by a $ sign instead of writing the whole chunk of text again and again.
40. To find all the files in your home directory modified or created today: