"Linux learning is not difficult" file/directory Management (4): cd command Change working directory path

Source: Internet
Author: User

7.4 "Linux learning is not difficult" file/directory Management (4): cd command Change working directory path


Use the CD command to change the user's working directory path. Working directory paths can use absolute or relative path names, absolute paths start with/(root), and then sequentially to the desired directory, relative paths start at the current directory.

Command syntax:

CD [options] [contents]

The meanings of the options in the command are as shown in the table.

Options

option meaning

-P

if it is a link path, the source physical path to the link path is entered


The CD commands are combined with various symbols using the method shown below.

    • CD: Enter the user's home directory;

    • CD ~: Enter the user's home directory;

    • CD-: Returns the directory where it was before entering this directory;

    • Cd.. : Returns the parent directory (if the current directory is "/", then "/" after execution.) );

    • Cd.. /.. : returns to the upper level two directory;


Example: Change the user working directory path to/etc.

[Email protected] ~]# cd/etc

Example: Change the user working directory path location to the parent directory of the current directory.

[Email protected] etc]# CD. [Email protected]/]# pwd/

Example: Change the user working directory path location to the user home directory.

[[Email protected]/]# CD ~ [[email protected] ~]# Pwd/root


This article extracts from "Linux Learning is not difficult" textbook, which is one of the most practical, theoretical and practical Linux Introductory materials. To read the entire book, visit the Linux ops (www.linuxywz.com) website .




"Linux learning is not difficult" file/directory Management (4): cd command Change working directory path

Related Article

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.