5 important ubuntu commands to know

Page 1

LinuxTechLab.com

5 important Ubuntu commands to know

Originally published on LinuxTechLab.com


Ubuntu is one of the favorite Linux distributions that is widely used for its GUI capabilities, especially for those who are moving from Windows to Linux. Ubuntu’s GUI is so much evolved that almost every functionality in Ubuntu can be used via GUI but there are some Ubuntu commands that you should learn, just to make your Ubuntu life easier. Here is the list of 5 important commands that will help you make most of your Ubuntu journey,

1- sudo Sudo command is used to provide root level access to your current local account, not only in Ubuntu but other Linux OS as well. Root account on Ubuntu is disabled by default (you can however enable it, read article HERE), but that does not mean that we can’t execute our commands with complete access. To get root level access or sudo access, prefix the command that you are executing with ‘sudo’ & you will then have root access to execute the command. For ex$ sudo init 6

2- apt-get Ubuntu uses APT (Advanced Package Tool) library for installing/removing/upgrading applications on the Ubuntu system. Apt-get command is used to for the management of the software that are being installed from APT library. To install a new package onto Ubuntu system, execute $ sudo apt-get install package_name


To remove an existing package, run $ sudo apt-get remove package_name To update a package $ sudo apt-get update package_name To update all packages to latest versions installed on machine, run $ sudo apt-get update $ sudo apt-get upgrade

3- nano Nano is default text editor that is available on Ubuntu machines, though we also have Vi editor installed but VI has more learning curve when compared to Nano. Thus making Nano very friendly to beginners or those have just jumped to Ubuntu from Windows. To create a new file or edit an existing one, open your termianl & execute $ sudo nano filename.txt Once you have made the changes, press ‘ctrl + o’ to save the changes & to exit out of editor, press ‘ctrl +x‘. You can also use ‘ctrl + g’ to bring up the help documentation, when using nano.

4- gksudo Gksudo is similar to sudo command with one difference that it used to provide root access for graphical applications while sudo only is used for terminal or CLI. It can be said that gksudo is sudo frontend for running graphical applications/commands.


An example would be $ gksudo nautilus It will launch nautilus file manager graphically.

5- dpkg DPKG is another package manager for Ubuntu OS & its many derived distros. With dpkg we can install, remove packages & also fetch information about packages. Its similar to RPM that is being used in CentOS/RHEL etc . To install a package with dpkg, run $ sudo dpkg -i package_name To remove a package $ sudo dpkg -r package_name ( Recommended read : Working with RPMs: Redhat Package Manager (with examples) ) Knowledge of these 5 commands is especially necessary if you plan to use Ubuntu as full time desktop/server. If you want to further learn more Linux commands, than you should look into our following tutorials, Useful Linux commands that you should know

If you think we have helped you or just want to support us, please consider these :Connect to us: Facebook | Twitter | Google Plus

LinuxTechLab.com



Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.