Linux Command cd

Source: Internet
Author: User

Cd


Command description:
 
Switch to the specified directory
 
 
 
Usage:
 
Cd [dirName]
 
 
 
Cd [relative or absolute path]
 
. Indicates the directory at this layer.
 
.. Indicates the upper directory
 
-Represents the previous working directory.
 
~ Represents the main folder where "current user identity" is located
 
 
 
Command practice:
 
[Root @ bkjia ~] # Absolute path of cd/home/bkjia
 
[Root @ bkjia] # cd. # No space is added after cd, and an error occurs.
 
-Bash: cd.: command not found
 
[Root @ bkjia] # cd.
 
[Root @ bkjia] # cd... the last directory in the current directory
 
[Root @ bkjia home] # cd-go to the previous working directory
 
/Home/bkjia
 
[Root @ bkjia] # cd
 
[Root @ bkjia ~] # Cd/home/bkjia
 
[Root @ bkjia] # cd ~ Go to your home directory
 
 
 
[Root @ bkjia/] # cd/home/bkjia

[Root @ bkjia] # pwd
 
/Home/bkjia
 
[Root @ bkjia] # cd... jump to the upper two layers of the current directory
 
[Root @ bkjia/] #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.