Linux basic commands-linux cd commands

Source: Internet
Author: User

The following describes the most common Linux commands for linux cd.

Linux cd commands are the most common commands in linux. We need to use these commands almost all the time.

The cd command is also available in DOS. It has the same functions as the linux cd command, but there are also differences. Let's explain it below.

Copy content to clipboard

Code:

Linux cd commands

1. Name: cd

2. intended audience: All Users

3. Command Format: Use spaces to separate cd [dirName] cd from directories)

4. function: Switch the current directory to dirName.

5. Example:

[Snms @ snms/] $ cd/

[Snms @ snms/] $ ls

Bin dev home lost + found mnt proc sbin srv tmp var

Boot etc lib media opt root selinux sys usr

[Snms @ snms/] $ cd/boot

[Snms @ snms boot] $ ls

Config-2.6.27.5-117.fc10.i686 lost + found

Efi System. map-2.6.27.5-117.fc10.i686

Grub vmlinuz-2.6.27.5-117.fc10.i686

Initrd-2.6.27.5-117.fc10.i686.img

[Snms @ snms boot] $

6. Tips for using linux cd commands:

Cd to go to the user's home directory;

Cd ~ Go to the user's home directory;

Cd-return the directory where it was located before entering the directory;

Cd .. return to the upper-level directory. If the current directory is "/", the execution is still "/"; ".." indicates the upper-level directory );

Cd... returns the last two levels of directories;

Cd! $ Use the parameters of the previous command as the cd parameter.

The above is the difference between the linux cd command and the DOS cd command.

  1. Xen Virtual Machine practice: How to Create a snapshot using Linux commands
  2. Ten Linux commands you may have never used
  3. Linux cd commands

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.