Basic Terminal Linux Commands

A few months ago, I decided to switch my PC Operating System from windows to ubuntu. One of the reason I did it because my current company has a policy to migrating OS from windows to ubuntu for some network engineers laptop, including my team but not mine 😃.

Of course this migration not smooth as expected, there are problems such as how to establisihing vpn connection to our intranet office or customer intranet, secure CRT script which we use it to roll out router configrations, office application compatibility and others. Thus, why I decided to change my own PC to ubuntu to help IT team and solve the problems.

I start googling how to use ubuntu, first think I’m curious enough is how to use a terminal. To open the terminal we simply press Ctrl + Alt + T.

Terminal Display.png

These are some basic commands I learned :

  • man

The command-line program man is used for displaying Unix and Linux manual pages (usually called manpages). Manpages are self-contained reference documents stored on the machine’s hard drive. They are usually short, but can be quite long. Ubuntu’s manpage system has a reference for every command-line program, and in many cases it is the only source of information.

Man displays the data using a pager, a type of program that shows files on text-based terminals one screen at a time. On Ubuntu, less is the pager that is used.

antares@antares-H55M-S2:~$ man man


source :

  • sudo

After I install ubuntu, I went to install updates on my ubuntu system with apt-get update command. But the terminal display notifications and the command won’t run.

apt-get update gagal.png

After did some researches, it caused I’m not ran the command as root account/privilege. I should ran sudo apt-get update with. Sudo means “Super user do!”, is used to give such permissions to any particular command that user want to execute. Sudo requires the user to enter user password to give system based permissions.

apt-get sukses.png

Source :

  • Su

Su command is used to switch from one account to another. If user types only su without any option then it will be considered as root and user will be prompted to enter user password.


We can use sudo and enter normal user password to switch to root user.

sudo su.png

Source :

  • Gksudo

gksudo is the same thing with sudo, but it is used for graphical operation which works using GUI instead of terminal. Short note form wiki :

You should never use normal sudo to start graphical applications as Root.You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by Root. (AFAICT, this is all that’s special about the environment of the started process with gksudo vs. sudo).

Example accessing shutter program via command line :
antares@antares-H55M-S2:~$ gksudo shutter

Source :

  • Clear

Command clear or Ctrl+L is used for clear the terminal screen.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s