Find it
Custom Search

Sunday, October 09, 2005

Navigating through Linux Directories



First some insight. This blog is generally about Kubuntu, the KDE counterpart of Ubuntu. But all the post you have read so far can be applied to other Linux distributions except for the following:

1. rpm command is for Redhat and Fedora.
2. dpkg and apt-get commands are for debian based packages like Ubuntu and Kubuntu.

Now on with the lessons.

I've realized that most of you maybe having problem navigating through the Linux folders when using the terminal.

Let me introduce you to the cd command. If you are familiar with the Windows command prompt, you have probably used chdir command to navigate through the Windows directories.

In Linux you will use cd.

1. Open a Linux Terminal (refer to my October 6 post on how to do this).

2. Type:
$ pwd

On my case it will return:
$ /home/anthony

pwd stand for "present working directory". It will tell you where you currently are in Linux.


To navigate to the higher directory:
1. Type :
$ cd ..

The two dots you see after the cd command stands for the parent directory

2. Now type:
$ pwd

On my case, it would display:
$ /home

You will see that my present working directory is now one level higher.

If you want to go higher, just type:

$ cd ..

again

Then check with the pwd command to verify where you are.

Now, assuming you are still at /home directory.

To get to the lower directory:
1. Type:
$ ls

ls command, stands for list. It will list the contents of the directory.

In my case, It displayed:

$ anthony

in Kubuntu you will now that what is listed is a directory because the font color is blue.

To go to the lower directory:

1. Type cd then the name of the lower directory.

$ cd anthony

2. To verify where you are use the pwd command again.

3. If you want to go to a directory lower than /home/anthony, just type cd again and the name of the lower directory.

I hope this was helpful.

Until next time! :)

3 comments:

Anonymous said...

Good site. Hope your blog does fine.
I have written about your blog in mine at
http://www.geekblog.5gigs.com/software/9/kubuntu-101

Temujin said...

Hi. Chaotic. Unfortunately, I can't answer your question at the moment.

However there are discussions on

http://www.transgaming.org
http://www.winehq.com

regarding this.

Goodluck!

Temujin said...

Srinivasan

Thanks for finding my blog interesting.
I visited your blog. Goodluck to you to on your endeavor.

You have a very nice layout there and you have a good writing voice.

Thanks again for noticing this site.