![]() |
![]() |
| Linux news | Newbie's Linux manual | Linux links | Link us | ||
| The Linux columns | Book reviews | ||
| DistroWatch + TuxReports | November 2, 2002 | |
Contents | Previous | Next | Download
In Linux, all files are part of a single filesystem; all residing in the root ( / ) directory. For example:
/home/john
...points to the directory john, which is stored in the directory home/, which is stored in the directory / (root).
In Linux, each user account has a home directory, to store work and configuration files in. If John has the account john, his home directory is /home/john. (root has the home directory /root .)
When you log-in at the console, or start a terminal window in X, you begin from your home directory.
Further Help:
What's a filesystem, directory, and file?
If you're intimidated by the many command examples in this book, don't panic. With practice and everyday use it'll all slowly sink in. If all else fails, remember almost everything can be done from X, with a few simple mouse-clicks.
cd /usr/doc
Move to the /usr/doc directory.
cd reports
Move to the reports directory, contained in the current directory.
cd ..
Move to the parent directory of the current directory.
Further Help:
What's a current and parent directory?
cd ../..
Move up two directories.
cd ../mywork
Move to the mywork directory, contained in the parent directory.
cd
Move to the home directory of the account you're logged-in to, e.g. /home/john.
cd -
Move back to the previous directory you were in.
cd ~/mywork
If logged-in to the account john, the above is short for, cd /home/john/mywork, i.e. the ~ (tilde) is shorthand for your home directory.
Intermediate Tip:
If logged-in to say, the account bob, there's also the shorthand cd ~john, short for cd /home/john. This you could then extend for example, to:
cd ~john/mywork
Contents | Previous | Next | Download
| About us | |
| Latest stable kernel: 2.4.19 | Latest development kernel: 2.5.44 Copyright © 1998-2002 Linuxdot.org. Linux ® is a registered trademark of Linus Torvalds. |
|