You are on page 1of 4

8 Basic Ubuntu command tutorial for beginners

Posted on February 3, 2011 by sachit

Todays Linux system are not like old Unix


environment where you have use command line to operate the system. The
GUI(graphical user interface) makes a job lot easier for the beginner Linux user who can
just run every application with the movement of mouse. But if you really want to learn
Linux perfectly you must learn to use terminal. Terminal is the command prompt like
in the windows machine which can do everything that you can do with graphical user
interface. Every things you do in GUI are operated in command which you dont feel and
know. Its hard to remember all command. If you cant remember its fine. You can try
and gradually you start remembering Therefore first you must understand the concept.
Linux terminal is the way to interact with the overall Linux system that is underneath
the Graphical environment.
How to access Terminal
Terminal will be under Applications menu -> Accessories -> Terminal Or you
can access it with shortcut key ctrl+alt+T
To access the Home Folder which you can find under places in the first place in
Graphical User Interface:
Type the ls which will bring up the files or folders in home folder as:

Here the home folder is accessed through terminal using the command ls which is the
same as you open the home folder from Places. You can see the different colour
combination. The blue colour folders represents the directory and the plain
whiterepresent a normal file. There also can be another colour defining the respective
characteristic of the folder.

The first information that you see in the command line is your username which is sachit
in my case and @ubuntu is the name of the computer. After that information The ~ sign
denotes the home which is same location as you go in the place>>>home. $sign is a
symbol for regular user that means you are login as regular user not the root user. The
full information is like this in my ubuntu: sachit@ubuntu:~$(which you can see
screenshot below)
To copy:
Lets learn how to copy though the terminal. I am going to make the copy of the file
words.txt which I am going to save as words-new.txt.

As, you can see in


the picture above the backup of the text file words.txt is created in the Home Folder
using the command cp.
To Rename:
To rename, its like same as copying the files. I am going to rename the file wordsnew.txt as rename.txt.

As, you can see in the picture the files words-new.txt is renamed as rename.txt using the
command mv.
Creating a new folder:
Let me create a folder name: ubuntu_rules which I am going to do as:

Fo
lder:ubuntu_rules is create using the command mkdir.
Moving the files:
Now, I want to move all the text files in the Home Folder that I created to a newly
created folder ubuntu_rules.

Here the *
stands for all which means I am moving the all text files into the folder
To view the text file:
Go the the specific folder where the text files are located using the command cd and
typeless filename.txt. I am going to open the text file rename.txt.
As, I enter this command text file
rename is executed as:

You can also use the tab completion


which means if there is a file name text and you want to access it then, type the word te
and press tab which will build rest of the command.
This much on this tutorial. I will be bringing up how to launch the applications, view the
system logs and others much more linux commands in the upcoming tutorials.
ubuntu_folder which is nicely done.
Changing the directory:
Now, I want to make sure that the all text files are copied properly in the folder
ubuntu_rules. For this, you have to get into the ubuntu_rules directory and see the files
in it.

To get back into the Home Folder you can either


type cd ~ or cd ..
To view the text file:
Go the the specific folder where the text files are located using the command cd and
typeless filename.txt. I am going to open the text file rename.txt.
As, I enter this command text file
rename is executed as:

You can also use the tab completion


which means if there is a file name text and you want to access it then, type the word te
and press tab which will build rest of the command.

You might also like