Professional Documents
Culture Documents
Working With Directories
Working With Directories
pwd
cd
absolute and relative paths
path completion
ls
mkdir
rmdir
pwd
man pwd
The pwd command (Print Working Directory).
The command or tool displays your current directory.
cd
man cd
This takes us to the BASH_BUILTINS
The cd command is just one of the commands on the list of bash builtins
cd
Your home directory or home folder is a folder/directory created when your user account
is created on the system.
The Linux administrative user root has its home as /root
All other system users have a home in /home
The user’s home is always a folder or directory with the user account name
root home directory: /root
sefange home directory: /home/sefange
cd ~
Use cd .. To go to the parent directory (the directory above your current directory in
the directory tree)
cd .
Absolute path: When you type a path starting with a slash (/)
The root of the file tree is assumed.
In this case the full address starts with / and ends in your desired destination
folder/directory.
Absolute and relative paths
Relative paths:
If you don't start your path with a slash: The current directory is the assumed starting
point.
When you login to Linux you are placed in your home directory. Your current directory
changes as you start to navigate around. So always check your current directory with pwd
and issue ls to list the contents.
Path completion