Last active
December 14, 2015 08:09
-
-
Save theamith/5055803 to your computer and use it in GitHub Desktop.
Ubuntu Terminal GreenHorns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. sudo | |
#to gain root privilege. | |
# sudo means superuser do which allows user to install/update/remove software as a super user. | |
Eg: sudo apt-get updates | |
# To run graphical application as root use "gksudo" | |
Eg: gksudo gedit | |
-------------------------------------------------------------------------------------------------------------------------------- | |
2. cd | |
# 'cd' (Change Directory) is the command used for navigating folders in the Terminal. | |
# By default terminal opens in your home folder. | |
# By typing cd will return to home folder. | |
# Tab button is used to auto complete. Eg: cd Dow and press tab it will show cd Downloads/ | |
-------------------------------------------------------------------------------------------------------------------------------- | |
3. ls | |
# lists all of the items (bar hidden files) in the current folder | |
-------------------------------------------------------------------------------------------------------------------------------- | |
4. ls -al | |
# lists all items in a folder, including hidden files and directories with all file info | |
-------------------------------------------------------------------------------------------------------------------------------- | |
5. ls -a | |
# shows list of all files in the directory | |
-------------------------------------------------------------------------------------------------------------------------------- | |
6. sudo apt-get install | |
# Applications available in the Ubuntu Software Center and added PPAs can be installed from the command line using 'apt-get install'. | |
Eg:sudo apt-get install chromium-browser | |
-------------------------------------------------------------------------------------------------------------------------------- | |
7. sudo apt-get remove | |
# To remove the Chromium web browser you would run | |
sudo apt-get remove chromium-browser | |
-------------------------------------------------------------------------------------------------------------------------------- | |
8. uname -a | |
# show the kernel version. | |
-------------------------------------------------------------------------------------------------------------------------------- | |
9. free | |
# see the RAM details | |
-------------------------------------------------------------------------------------------------------------------------------- | |
10. whereis application_name | |
# it will show application installation location | |
-------------------------------------------------------------------------------------------------------------------------------- | |
11. df -h | |
# disk usage space | |
-------------------------------------------------------------------------------------------------------------------------------- | |
12. ps -e | |
# list the currently running processes | |
-------------------------------------------------------------------------------------------------------------------------------- | |
13. pwd | |
# show the surrent working directory | |
-------------------------------------------------------------------------------------------------------------------------------- | |
14. mkdir | |
# make directory Eg: mkdir dirname | |
-------------------------------------------------------------------------------------------------------------------------------- | |
15. rmdir | |
# remove file or directory. Eg: rmdir file/directory name | |
-------------------------------------------------------------------------------------------------------------------------------- | |
16. mv | |
# move or rename a file | |
Eg: mv file1 ~/Downloads/Archive/ --> moves a file | |
mv logo_2.jpg new_logo.jpg --> rename a file | |
-------------------------------------------------------------------------------------------------------------------------------- | |
17. cat | |
# view file contents. | |
Eg: cat install.log | |
-------------------------------------------------------------------------------------------------------------------------------- | |
18. man | |
# if you want to know more about rm command, then type - | |
Eg: man rm | |
-------------------------------------------------------------------------------------------------------------------------------- | |
19. cp | |
# copy files/directories | |
Eg: cp movie_name.mp4 ~/Downloads/movies/ | |
-------------------------------------------------------------------------------------------------------------------------------- | |
20. wget | |
# GNU Wget or wget is very handy in downloading stuffs from internet, over the command line. | |
Eg: wget url_of_the_content | |
-------------------------------------------------------------------------------------------------------------------------------- | |
21. gksudo | |
#Run GUI Application with Root privilege | |
Eg: gksudo nautilus | |
-------------------------------------------------------------------------------------------------------------------------------- | |
22. shutdown | |
# To shutdown the computer from terminal | |
Eg: shutdown -h or shutdown 0 or shutdown 10.30 | |
-------------------------------------------------------------------------------------------------------------------------------- | |
23. restart | |
# restart the computer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment