Terminal Commands are cool and very handy sometimes (even for common users who don’t like terminal), also useful in learning some cool stuffs about Ubuntu or GNU/Linux in general (so it’s also good for learners).
I’ve prepared a list of few terminal commands – that anyone can learn and master (in couple of minutes), in order to enjoy a better experience with Ubuntu or other Linux distributions (and don’t worry about – the Ubuntu version you are using such as – 12.04 LTS – “Precise Pangolin” or 11.10 or may be the upcoming one – 12.10, because it doesn’t change often unlike the other things in Ubuntu :), same for Ubuntu derivatives such as Linux Mint 13(Maya)).
Top 17 commands for Ubuntu Beginners
Basics GNU/Linux Commands
#1. ls : list directory contents
If you want to see hidden files/directories (beginning with dot.), the use -a flag.
Check the manual for more detail (man ls).
#2. cd : Change Directory
cd ../ cd /home/Desktop
. represents the current directory
.. represents the parent directory
~ represents the home directory (of the user)
#3. pwd : print the current/working directory
#4. mkdir : make/create directory.
#5. rm : remove/delete file/directory
NOTE : it removes directories only if it’s empty, unless you specify -f flag for force deletion. But you must be careful with the arguments such as -r, -f. (-rf is very dangerous).
#6. sudo : superuser do, to gain root privilege
sudo apt-get install gnome-shell
Then enter your user account password, and you would be able to do administrative tasks like root. So if you’re getting any permission error using a command, then adding sudo as a prefix, might help.
#7. mv : rename or move a file/directory
mv file1 ~/Downloads/Archive/
the above command will move the file from the current directory to target directory.
mv logo_2.jpg new_logo.jpg
it will rename the file to new_logo.jpg.
#8. cat : View File contents
#9. man : A Reference manual for utils/commands/programs
e.g if you want to know more about rm command, then type –
#10. cp : Copy Files/Directories
cp movie_name.mp4 ~/Downloads/movies/
The above command will copy the movie_name.mp4 to the specified directory.
#11. wget : Download files from server
GNU Wget or wget is very handy in downloading stuffs from internet, over the command line.
#12. gksudo : Run GUI Application with Root privilege
The above command will open nautilus with root privilege. It’s just like sudo, but in GUI mode.
#13. shutdown : To shutdown the computer from terminal
where time can be 0 if you want to shutdown now or specify the exact time such as 10:30.
#14. restart : Restart the computer
These are Ubuntu Specific commands. It Requires root privilege, so just add the sudo prefix before each command (it will ask for the user password and you’re done!).
#15. apt-get : Command Line Tool for handling packages
There are various options such as
install – To install package.
e.g Install the program PyRoom (A distraction Free Text Editor)
sudo apt-get install pyroom
remove – To remove package
sudo apt-get remove kate
update – To update the package cache
sudo apt-get update
#16. add-apt-repository – To add a PPA (for your favorite Application)
e.g add the PPA for the App Eidete (Screencasting program)
sudo add-apt-repository ppa:shnatsel/eidete-daily
After, adding the PPA, apt-get update command is required.
#17. apt-cache : To access the Package details from cache
search : search for the related packages in the apt-cache
apt-cache search image editor