Change Directory – Cd command in Linux
What is cd command
Cd command or change directory command is used to change the
current working directory in Linux or unix like operating systems. Ot is one of
the most basic and frequently used command when yo working with linix terminal.
You can specify the path of the directory and in addition that you can change
directory with special sysmbols.
1.
.. (Double dots) – The symbol for the upper folder.
2.
. (Dot) - the symbol for the current folder.
3.
Cd .. - if you run cd .. it moves to the previous folder.
4.
Cd w/o parameter - if you run cd command without any parameter
it will give you home folder of the current user.
5.
Cd ~user – Moves to the home folder of the named
user.
6.
Cd - Moves to the previous folder.
7.
Cd / - Moves to the root directory of the file
system.
Lets go ahead and practise these commands,
so go to kali-
1st we run cd command to go
specific directory from current folder
To do this run command cd dir1/dir2/dir3
Now we have documents directory and inside
document directory we have a directory named gateway and inside gateway we have
example directory. So navigate to example directory we have to run command cd
documents/gateway/example
Now check the current folder with pwd
command
Lets move to the previous folder with
double dots run cd ..
Now check again with the current folder with
pwd command, as you see we are now moved to the upper folder.
Go ahead run cd command without ant
parameter and check current folder with pwd
As you see we are at home folder of kali user.
Now run cd with dash command
We moves to the previous position . we are
moved back to example folder.
So goto the home folder again use cd command
with tidle sing with user name
Cd ~kali
We are at home folder of kali user.
Finaly the last command we use to navigate
to root of file system
Cd /
Ok we are at root of the file system.
Hope you understand, if you have any query.
You can comment me below in the comment section.
Thanks for watching see you again bye.
cd Command in Linux |Linux for Beginners 2021,
#LinuxforBeginners2021
#gatewaysolutions
cd command in linux,
cd command,
cd command windows,
cd command in dos,
cd command full form,
cd command in linux with examples,
cd command in Ubuntu,
cd command prompt,
cd command in python,
cd command in git bash,
#linuxcommandsforbeginners,
how to change directory in kali linux,
mkdir command in unix,
cp command in linux,
cd command in termux,
ls command in linux,
cd command windows,