Linux command detailed-CD

Source: Internet
Author: User

Linux CD commands can be said to be the most basic Linux command statements, and other command statements to operate, are built on the use of CD on the command.

So, learn Linux? Common command, you must learn first? A CD? tips on how to use commands.

? ? 1.? command format:

CD [directory name ]

? ? 2.? command function:

Toggle Current directory to Dirnam e

? ? 3.? Common examples

3.1. Example one: Enter the system root directory

Command:

CD/

Output:

[[Email protected] ~]# CD/

Note: Enter the system root directory, the above command after the execution of the LS command to see, the current directory has been to the system root directory

???? ??

Command:

Cd..

???? Output:

????

Description

Enter the system root directory to use "? CD?..? " always back, you can reach the root directory

Command:

Cd?.. /..?

Output:

description : Use CD? The command implements the parent directory into the parent directory of the current directory.

Example 2: Use? A CD? command to enter the current user home directory

The "Current User home Directory" and "system root" are two different concepts. There are two methods to enter the current user home directory.

Command 1:

Cd

Output:

command 2 :

CD ~

Output:

Example 3 : Jump to the specified directory

Command :

CD MNT

Output :

Description :

jump to the specified directory, starting at the root directory, and adding / The subdirectories in the current directory can be written directly by name

Example four: return to the directory in which it was before entering this directory

Command :

CD-

Output :

Example five: use the parameters of the previous command as CD parameters.

Command:

CD!$

??

Linux command detailed-CD

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.