Can You Explain Linux Directory Terminology?
To navigate your Linux file system, there are several terms you should understand.
Current directory The directory you are in at a given time, sometimes called the current working directory. The pwd (print working directory) command will tell you the name of the current directory. Subdirectory A directory within the current directory.
Parent directory The directory above the current one. Every directory except the top level has a parent. If you are in the /usr/spool directory, then /usr is the parent.
Home directory A user's personal directory. For example, if your user name is hermie, your home directory is /home/hermie. The user normally has complete control over all files stored in directories beneath the home directory. Exception: If the root user copies a file to your home directory, root still owns and controls that file.
Root directory The top of the file system, denoted by a slash. Only subdirectories appear below this directory. Don't confuse this with /root, the home directory for the root user. When speaking, always refer to / as "the root directory" and to /root as "slash root."
Absolute file name A file name that is valid no matter where you are in the file hierarchy. In practice, this means it must start with a slash and specify the full path to the file. For example, /home/hermie/recipes/sludge_fudge is an absolute file name, but sludge_fudge is not.
Relative file name A file name that specifies a file relative to the current directory. For example, if you were in hermie's home directory, /home/hermie/, you would reference that healthy fudge recipe as recipes/sludge_fudge.
Comments - most recent first
(Please feel free to answer questions posted by others!)
/ is used to represent the root directory.
~ is used to represent your home directory
(.) Simply denotes the current folder/directory
(..) Simply denotes the parent directory
/ When use without . or .. as prefix. It means root directory or folder
As explained on other section on this site, each folder represents a branch of a tree, and the root itself is the tree.
Files are treated as leaves.
That is why using multiple combination of ../ will move back to the each parent, depending on the number of times being called. And if using cd ../ with no parent will always go to the root.
cd ../.. moves back two places to home
cd ../../.. moves back three places
cd ../../../.. still only moves back three places because we can't go back any further
NO SPAM! If you post garbage, it will be deleted, and you will be banned.
Copyright © by -
All rights reserved - Redistribution is allowed only with permission.