Beginners guide to Terminal Commands (part one)

Coming from an entirely Windows background, the unix terminal continually raised one question in my mind; whats the point? Having gotten used to using it now, i can see the benefits of being in control of everything you are doing, as opposed to allowing an automated process to do the work for you. Here are some basic commands to get started using the terminal, for example, in Ubuntu Linux.

An important part of using the terminal through directories is, to me, visualisation, coming from a windows background it should be easy enough to ‘imagine’ a folder and its contents. Lets start by seeing where you are now on the system, ie what directory are you in?

Open Terminal
Type pwd

This will show you the current directory you are in. Most likely it is /home/tomas, where tomas is your username. Next we will list all the files in the current directory, this is done by typing ‘ls’.

Type ls

You should now see a list of other files and directories ‘below’ the current directory. Let’s now change our directory to Desktop, this is done by typing ‘cd’ followed by the directory you wish to go to. The directory name is case-sensitive.

Type cd Desktop

Now you are in the Desktop directory. Here we will create a directory called ‘newFolder’.

Type mkdir newFolder

Feel free to take a look on your desktop now for your new directory ‘newFolder’. Now lets go into that directory and list its contents.

Type cd newFolder
Type ls

As you should see the directory is empty, as it should be, to navigate up one level (back to Desktop) we use .., thats dot dot. This represents ‘up one level’ and can be used in many respects, in this case:

Type cd ..
Type pwd

The pwd will show /home/tomas/Desktop. This is just a basic guide and there are many more commands to learn at first, more to come in following posts, here are a list of the commands we used and their meanings:

pwd – Print Working Directory (show me where i am)
cd – Change Directory
ls – List the contents of a directory
mkdir – Make a new directory


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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s