10 Ubuntu Basic Commands With Examples | Linux Operating System

Dec 22, 2017 11452 Aakash ubuntu basic commands

This article provides the top 10 most common Ubuntu commands that you use very frequently. If you are a Ubuntu user then you need to know these basic commands. Through Terminal we can control, execute any operation in Ubuntu. Though you can do it using GUI, but Terminal is the most powerful provided for this purpose. Windows cmd(command prompt) also similar to the terminal but as much effective. So here you go with 10 Ubuntu Basic Commands.

List of 10 Basic Ubuntu Commands

sudo -i

ubuntu basic commands

This Ubuntu command makes you superuser of the OS. In fact, superuser has abundant privileges. New packages, Updates can be installed only by superuser. From terminating process to mounting a drive requires superuser. After $ sudo -i enter your password. This command security for important contents of the OS.

cd Name_of_the_directory

ubuntu basic commands

cd commands helps in moving inside in the directory. This Ubuntu command work only in moving forward. In fact, Multiple directories also are mention in a single command. Like $cd Documents/mydoc/docs1. cd means Change Directory. This Ubuntu command works in all Linux Distros.

cd ..

ubuntu basic commands

cd .. helps in moving backwards in the directory (File System). Similarly cd .. nature is like cd name_of but functions opposite.In fact, Move to root directory by simply typing cd / . In fact, this Ubuntu command does not vary from distro to distro.

ls

ubuntu basic commands

ls command list all the contents of the directory. ls can be coupled with -a, -l etc. ls -a also lists the hidden contents.

dpkg

ubuntu basic commands

dpkg is a powerful command line tool which helps in installing, deleting packages, software in the OS. Package must be of (.deb) extension because the Ubuntu support this extension. This Ubuntu command executes with superuser like sudo dpkg -i package_name.

sudo ps aux|grep process_name

ubuntu basic commands

This is a customized command. It helps in deleting the unnecessary processes. While It gives the PID (Process ID) and after getting PID execute this command kill -9 PID.

apt-get

ubuntu basic commands

apt-get is a very powerful command line tool. This Ubuntu command also installs, delete and update the software or packages. In fact, This command different for different distros. This command works in this way sudo apt-get install package_name.

shutdown

ubuntu basic commands

shutdown command simply turns off the system. In fact, shutdown can be modified by adding some option to it. Like shutdown -r simply reboot the system.

man

This tool is like a information store of all the commands. Just type man name_of_the_command and will every option, method, description for that command. Like man ls, man shutdown, man cd, man apt-get.Ex-man ls

ubuntu basic commands

rm

ubuntu basic commands

rm command removes or deletes a file in the directory. rm directory_name delete an empty file. In fact, Use rm -r director_name to delete the directory and its contents recursively. This Ubuntu command does not vary from distro-to-distro.