Linux-based operation systems such as Ubuntu 14.04/16.04/18.04 that I have been using are great for scientific computing and for testing and using numerous open source software. I used to be a heavy Windows user, but now I use Windows less and less only when it has to be used.

I haven’t studied Linux systematically, and my main approaches have been to google what I need. The following are some useful Linux tricks that are probably what a Linux newbie like me most want to know. I will keep adding the notes whenever I find something interesting.

Ubuntu terminal command tricks

  • Click ‘Tab’ for auto-completion; double click ‘Tab’ to list all matched
  • up key for the previous terminal command
  • Ctrl r for ’r’everse search terminal commands previously used
  • Shorten the display of directory paths by changing all \w to \W in the PS1 key in ~/.bashrc, and then . ~/.bashrc to load it
  • Copy folders between local and remote: scp -r /path/from/destination username@hostname:/path/to/destination; scp -r username@hostname:/path/from/destination /path/to/destination