[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
LinuxShellCommandsCD

Linux Shell Commands: CD

The command cd is short for Change Directory. Directory, for those brought up on a diet of Windows, is another word for folder.

  • cd / - This takes you to the root folder of the system.
  • cd .. - This takes you up one level in the directory tree (e.g. if you were in /usr/bin, typing this would place you in /usr).
  • cd /etc - Putting a / at the start allows you to specify a path from the root directory (e.g. an absoloute path).
  • cd foobar - This takes you into the directory foobar within the current directory (provided it exists).
Of course, you can put these together to do things like this:-
  • cd ../etc - If you typed this while you were in the /bin folder, then you would go up a level and then into the /etc folder, but all in one go rather than it taking 2 commands.






last edited (December 4, 2002) by infidel, Number of views: 1779, Current Rev: 2 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.