How to Switch between Two Directories in SSH

  • Post author:
  • Post category:Uncategorized
  • Post comments:0 Comments

In this article, we explain you about Directory In Linux system and switching directory. In an operating system, the files are arranged in similar a manner is called a hierarchical directory structure. This means that they are organized in a tree-like pattern of directories which may contain files and other directories. In Linux system, all the data stored in files and all files organized in directories. In simple words, a directory is just a folder or a special type of file that contains other files and folders. The part of the hard disk where you are authorised to save data is called as the home directory. Normally all the data you want that will be saved in files and directories in your home directory.

Switching Directory is a process of changing control over from one directory to another directory. It means the action of moving or jumping from the current working directory to some another directory or subdirectory. This process also called as change directory or CHDIR in Linux systems.

Move into another directory

Use this command to move into a directory:


Command to specify the full path from the root of the server:

cd /var/www/vhosts/

Command to type the path from where you are now (leave out the beginning /):

cd downloads/

Command to go up a directory level:

cd ..

Command to  go to your home directory:

cd ~

Leave a Reply