Cd command, Linux
From NetworkCommands
A command shell built-in function available on Linux platforms; used to change the current (working) directory.
Contents |
Usage Syntax
cd [path/]directory
Usage Examples
cd / - change to the root directory
cd ~ - change to the current user's home directory
cd .. - change to the directory above
cd temp - change to subdirectory temp - (you are specifying a relative path, temp must be a subdirectory of the current directory)
cd /etc/temp - change to subdirectory /etc/temp (you are specifying an absolute path, starting at the root of the filesystem)
Usage Notes
The following shell file system shortcuts can be used with this command;
/ - the file system root directory
. - the current directory
.. - the parent directory (the directory above this one)
~ - the current user's home directory
Linux Usage Notes
With most Linux or Unix commands;
- Brief help can be displayed using the option/keyword: -h or --help, for example: chmod --help
- A full command manual can be displayed using the man command followed by the command name, for example: man chmod
- Sometimes 'info' pages are used instead of or to provide more information than man pages; for example: info chmod
- Version information can be display using the option/keyword: -v or --version, for example: chmod --version
Related Commands
Use the pwd command to display (or print) the current working directory
Use the mkdir command to create (or make) a new directory
Related Articles
Information on Linux File Locations
Information on other Linux shell functions
Information on other Linux commands
Information on F5 BigIP commands
Information on Cisco commands
Information on Vyatta commands
Information on Extreme commands
Information on Blue Coat SGOS commands
Information on Nokia IPSO commands







