Log in Go to the main page Page Discussion History Go to the file list Go to the site toolbox

Cd command, Linux

From NetworkCommands


Image:Tux_64x64.png

A command shell built-in function available on Linux platforms; used to change the current (working) directory.

Contents

Image:Vm-power-on-medium.png Usage Syntax

cd [path/]directory

Image:Vm-power-on-medium.png 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)

Image:accessories-text-editor-v2-medium.png 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

Image:accessories-text-editor-v2-medium.png 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

Image:icemon-medium.png 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

Image:icemon-medium.png Related Articles

Information on Linux File Locations

Information on other Linux shell functions Image:Tux-small.png

Information on other Linux commands Image:Tux-small.png

Information on F5 BigIP commands Image:F5-logo-small.png

Information on Cisco commands Image:Cisco-logo-small.png

Information on Vyatta commands Image:Vyatta-logo-small.png

Information on Extreme commands Image:Extreme-logo-small.png

Information on Blue Coat SGOS commands

Information on Nokia IPSO commands


Image:internet-group-chat-small.png We really do appreciate all feedback so please do send your comments, suggestions or corrections to steve#networkstuff.eu (replacing the # with an @)



Site Toolbox:

Personal tools
This page was last modified on 24 December 2008, at 16:01. - This page has been accessed 22 times. - Disclaimers - About NetworkCommands
Powered by MediaWiki