Few Linux Terminal Tricks

Few Linux Terminal Tricks

There are few important commands that i think if you use into your terminal, you can save time and increase your productivity.

  1. tab => for autoCompletion.
  2. cd - => takes you to the previous directory.
  3. cd ~ => takes you to the home directory.
  4. ll or ls -l => lists the contents of a directory.
  5. command_1; command_2; command_3 => for running the multiple commands.
  6. command_1 && command_2 => second command will execute only if first command got executed successfully.
  7. Ctrl+r search_term => First of all press Ctrl+r, you will need to type a word or letter to find some link or command that you want to type again but forgot what it was.
  8. Ctrl+a => takes you to the beginning of the line in terminal.
  9. Ctrl+e => takes you to the end of the line in terminal. 10.less fileName => if you just want to read a text file. I think it is better to use less than using nano or vim. But to get out of less file, go down to the page and type q.
  10. > file => this will empty the file but will not delete it.