The Essential Linux commands that every user needs to know

Additional tip that can save some time:
  • Hotkey Ctrl+D does as default the same as the Exit command. Very handy when logged into another user account or via ssh to a remote computer.
  • Using sudo -i to log into the admin account. I prefer doing this over sudo because then it keeps separate command history for root user.
 
I can't believe you showed how to create aliases with the command line, specified that it will be deleted if the system is switched off (see * note below about this) and don't even tell how to add them to the .bashrc to make them permanent.

The user's .bashrc (or the .cshrc if you use tcsh) is loaded every time you launch a terminal, so if you open the file with nano or vim (nano ~/.bashrc), add the alias line to it and save the file, every time you will open a new terminal the line will be executed and you will have your alias ready to be used. If you want it to be available in the current terminal (the one you used to edit the. bashrc), just type

source ~/.bashrc


*aliases created with a command line are actually only defined in the terminal in which they get created and will be deleted if you close this terminal, not only after a system shutdown.
 
  • Like
Reactions: Grobe