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.
- Xen Virtual Machine practice: How to Create a snapshot using Linux commands
- Ten Linux commands you may have never used
- Linux cd commands