Linux Learning Notes--CD command (toggle directory) __linux

Source: Internet
Author: User
Tags parent directory

CD: English name change directory, changing the meaning of your directory.

1. Command format:

CD [Directory name]

2. Simplify the operation:

CD ~  Enter the home directory of the current user the CD is the    same as the CD ~ command, which is to enter the home directory CD for the current user
-  into the last directory CD. Go to the
parent directory
CD  . Enter current directory

3. Relative path VS absolute path:

1 relative path: Lookup with reference to current directory.
   such as: [Root@localhost ~]# CD ... /opt/hosts/
2 Absolute path: Specified from the root directory, first-level recursive lookup. Can enter a specified location in any directory.
   such as: [Root@localhost ~]# cd/opt/hosts/

Description:

relative paths are searched because they are referenced by the current directory, so if the directory changes, the command may not run.

catalog complement shortcut key: Tab key

When we enter a directory or the opening character of a command, click the "tab" key or the two "tab" keys, and the directory or command that begins with this character will be prompted. If there is no hint, then there is no directory or command at the current directory that starts with this character.

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.