Linux – cd command in Linux




Linux-Command-Line-Tutorial-101
Linux-Command-Line-Tutorial

Linux cd command.

cd – Change the shell working directory.

cd command syntax

cd [-L|-P]  [dir]

cd command options

cd command main options:

option description
cd Change the current directory. With no arguments “cd” changes to the users home directory. (cd <directory path>)
cd pathname cd will change you to the specified directory

/home/username$  cd /home            
/home$

 

Now let us practice some cd commands.

 

Command:

cd ~

“~” is the location of your home directory

/home/username/Downloads$ cd ~
/home/username$

Command: cd ..

“..” is the location of the directory below current one

/home/username$ cd ..
/home$ cd ..
/§

Command: cd path-name

cd will change you to the specified directory

/home/username$ cd /usr/bin
/usr/bin$ pwd
/usr/bin

Command: cd .

In Linux, (.) means the current directory, so typing

/home/username$ cd .

 


Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com





Be the first to comment

Leave a Reply

Your email address will not be published.


*