- 1
- 2
- Command Prompt (Windows)
- Cd (perintah)
- Command & Conquer: Generals – Zero Hour
- Command & Conquer: Generals
- Linux
- Ubuntu
- Command & Conquer
- DOS
- Perintah DOS
- Perlindungan Salinan Cakram Padat dan DVD
- Cd (command)
- CD (disambiguation)
- List of DOS commands
- Pwd
- Cmd.exe
- Dot (command)
- Command & Conquer
- Shell builtin
- Command-line interface
- Microsoft PowerToys
- CMD: 11 basic commands you should know (cd, dir, mkdir, etc.)
- How to Change Directories in Command Prompt on Windows 10
- cd | Microsoft Learn
- cd (command) - Wikipedia
- How to Change the Directory in Linux | cd Command
- Cd cmd command - GeeksforGeeks
- Cd Command in Linux (Change Directory) | Linuxize
- terminal - What is the difference between `cd ..`, `cd .`, and `cd ...
- How to Use the cd Command on Linux - How-To Geek
- cd command in Linux with examples - LinuxConfig
Infiltration (2022)
Gravity (2013)
Eastern Bandits (2012)
Elite Squad: The Enemy Within (2010)
Three Billboards Outside Ebbing, Missouri (2017)
Cd (command) GudangMovies21 Rebahinxxi LK21
The cd command, also known as chdir (change directory), is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files.
Implementations
The command has been implemented in operating systems such as Unix, DOS, IBM OS/2, MetaComCo TRIPOS, AmigaOS (where if a bare path is given, cd is implied), Microsoft Windows, ReactOS, and Linux. On MS-DOS, it is available in versions 2 and later. DR DOS 6.0 also includes an implementation of the cd and chdir commands. The command is also available in the open source MS-DOS emulator DOSBox and in the EFI shell. It is named chdir in HP MPE/iX. The command is analogous to the Stratus OpenVOS change_current_dir command.
cd is frequently included built directly into a command-line interpreter. This is the case in most of the Unix shells (Bourne shell, tcsh, bash, etc.), cmd.exe on Microsoft Windows NT/2000+ and Windows PowerShell on Windows 7+ and COMMAND.COM on DOS/ Microsoft Windows 3.x-9x/ME.
The system call that effects the command in most operating systems is chdir that is defined by POSIX.
Command line shells on Windows usually use the Windows API to change the current working directory, whereas on Unix systems cd calls the chdir() POSIX C function. This means that when the command is executed, no new process is created to migrate to the other directory as is the case with other commands such as ls. Instead, the shell itself executes this command. This is because, when a new process is created, child process inherits the directory in which the parent process was created. If the cd command inherits the parent process' directory, then the objective of the command cd will never be achieved.
Windows PowerShell, Microsoft's object-oriented command line shell and scripting language, executes the cd command (cmdlet) within the shell's process. However, since PowerShell is based on the .NET Framework and has a different architecture than previous shells, all of PowerShell's cmdlets like ls, rm etc. run in the shell's process. Of course, this is not true for legacy commands which still run in a separate process.
Usage
A directory is a logical section of a file system used to hold files. Directories may also contain other directories. The cd command can be used to change into a subdirectory, move back into the parent directory, move all the way back to the root directory or move to any given directory.
Consider the following subsection of a Unix filesystem, which shows a user's home directory (represented as ~) with a file, text.txt, and three subdirectories.
If the user's current working directory is the home directory (~), then entering the command ls followed by cd games might produce the following transcript:
The user is now in the "games" directory.
A similar session in DOS (though the concept of a "home directory" may not apply, depending on the specific version) would look like this:
C:\> dir
workreports
games
encyclopedia
text txt 1903 Thu Oct10th 12:43
C:\> cd games
C:\games>
DOS maintains separate working directories for each lettered drive, and also has the concept of a current working drive. The cd command can be used to change the working directory of the working drive or another lettered drive. Typing the drive letter as a command on its own changes the working drive, e.g. C:; alternatively, cd with the /d switch may be used to change the working drive and that drive's working directory in one step.
Modern versions of Windows simulate this behaviour for backwards compatibility under CMD.EXE.
Note that executing cd from the command line with no arguments has different effects in different operating systems. For example, if cd is executed without arguments in DOS, OS/2, or Windows, the current working directory is displayed (equivalent to Unix pwd). If cd is executed without arguments in Unix, the user is returned to the home directory.
Executing the cd command within a script or batch file also has different effects in different operating systems. In DOS, the caller's current directory can be directly altered by the batch file's use of this command. In Unix, the caller's current directory is not altered by the script's invocation of the cd command. This is because in Unix, the script is usually executed within a subshell.
Options
= Unix, Unix-like
=cd by itself or cd ~ will always put the user in their home directory.
cd . will leave the user in the same directory they are currently in (i.e. the current directory won't change). This can be useful if the user's shell's internal code can't deal with the directory they are in being recreated; running cd . will place their shell in the recreated directory.
cd ~username will put the user in the username's home directory.
cd dir (without a /) will put the user in a subdirectory; for example, if they are in /usr, typing cd bin will put them in /usr/bin, while cd /bin puts them in /bin.
cd .. will move the user up one directory. So, if they are /usr/bin/tmp, cd .. moves them to /usr/bin, while cd ../.. moves them to /usr (i.e. up two levels). The user can use this indirection to access subdirectories too. So, from /usr/bin/tmp, they can use cd ../../local to go to /usr/local
cd - will switch the user to the previous directory. For example, if they are in /usr/bin/tmp, and go to /etc, they can type cd - to go back to /usr/bin/tmp. The user can use this to toggle back and forth between two directories without pushd and popd.
= DOS, OS/2, Windows, ReactOS
=no attributes print the full path of the current directory.
-p Print the final directory stack, just like dirs.
-n Entries are wrapped before they reach the edge of the screen.
-v entries are printed one per line, preceded by their stack positions.
cd\ (DOS and Windows only) returns to the root dir. Consequently, command cd\subdir always takes the user to the named subdirectory on the root directory, regardless of where they are located when the command is issued.
Interpreters other than an operating systems shell
In the File Transfer Protocol, the respective command is spelled CWD in the control stream, but is available as cd in most client command-line programs. Some clients also have the lcd for changing the working directory locally.
The numerical computing environments MATLAB and GNU Octave include a cd
function with similar functionality. The command also pertains to command-line interpreters of various other application software.
See also
Directory structure
pushd and popd
chroot
List of command-line interpreters
References
Further reading
Wolverton, Van (1990). MS-DOS Commands: Microsoft Quick Reference, 4th Revised edition. Microsoft Press. ISBN 978-1-55615-289-4.
John Paul Mueller (2007). Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000. John Wiley & Sons. ISBN 978-0-470-16579-9.
Barrett, Daniel J. (2012). Macintosh Terminal Pocket Guide: Take Command of Your Mac. O'Reilly. ISBN 978-1-4493-2898-6.
External links
Windows XP > Command-line reference A-Z > Chdir (Cd) from Microsoft TechNet
cd: change the working directory – Shell and Utilities Reference, The Single UNIX Specification, Version 4 from The Open Group
Kata Kunci Pencarian:

Using cd Command in Linux

Using the cd Command - Pi My Life Up

Using cd Command in Linux

Cd Desktop Command | Hot Sex Picture

How to use cd command? Easy Guide For Beginner- OffSecPath

How to Change Directory in Linux Using the cd Command

Cd Command In Windows Wishmesh | Hot Sex Picture

CD Command (with examples)
![The “cd” Command in Linux [6 Practical Examples]](https://res.cloudinary.com/dyadcr1f1/image/fetch/f_auto,q_auto/https%3A%2F%2Flinuxsimply.com%2Fwp-content%2Fuploads%2F2022%2F12%2Fcorrected3-1536x678.png)
The “cd” Command in Linux [6 Practical Examples]
![The “cd” Command in Linux [6 Practical Examples]](https://res.cloudinary.com/dyadcr1f1/image/fetch/f_auto,q_auto/https%3A%2F%2Flinuxsimply.com%2Fwp-content%2Fuploads%2F2022%2F12%2Fcd4-2048x695.png)
The “cd” Command in Linux [6 Practical Examples]
![The “cd” Command in Linux [6 Practical Examples]](https://res.cloudinary.com/dyadcr1f1/image/fetch/f_auto,q_auto/https%3A%2F%2Flinuxsimply.com%2Fwp-content%2Fuploads%2F2022%2F12%2Fcorrected2-2048x702.png)
The “cd” Command in Linux [6 Practical Examples]
![The “cd” Command in Linux [6 Practical Examples]](https://res.cloudinary.com/dyadcr1f1/image/fetch/f_auto,q_auto/https%3A%2F%2Flinuxsimply.com%2Fwp-content%2Fuploads%2F2022%2F12%2Fwhat-is-cron-job-5-1.png)
The “cd” Command in Linux [6 Practical Examples]
cd command
Daftar Isi
CMD: 11 basic commands you should know (cd, dir, mkdir, etc.)
Apr 26, 2022 · In this article, we show you how to change the directory in CMD, change the drive, see the contents of a directory, how to rename, copy, and delete files and folders, and also how to launch an application from the Command Prompt. We’ll …
How to Change Directories in Command Prompt on Windows 10
Aug 19, 2023 · To change directories in Command Prompt on Windows 10, you can use the drag-and-drop method by typing "cd," dragging the folder into the window, and pressing Enter. Alternatively, you can type the "cd" command followed by the directory name to change directories directly within Command Prompt.
cd | Microsoft Learn
Nov 1, 2024 · Reference article for the cd command, which displays the name of or changes the current directory.
cd (command) - Wikipedia
The cd command, also known as chdir (change directory), is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files.
How to Change the Directory in Linux | cd Command
Jan 2, 2025 · The cd command allows you to change directories in Linux, making it easier to navigate through the file system and manage your files efficiently. Whether you’re a beginner or an experienced user, understanding how to use the cd command in Linux is essential for smooth command-line operations.
Cd cmd command - GeeksforGeeks
Sep 30, 2020 · Cd is a generic command found in the Command Interpreter of most operating systems. Displays the name of or changes the current directory. CHDIR [..] CD [..] .. Specifies that you want to change to the parent directory. Type CD drive: to …
Cd Command in Linux (Change Directory) | Linuxize
Jun 27, 2021 · The cd (“change directory”) command is used to change the current working directory in Linux and other Unix-like operating systems. It is one of the most basic and frequently used commands when working on the Linux terminal.
terminal - What is the difference between `cd ..`, `cd .`, and `cd ...
Sep 25, 2023 · The command cd changes directories. So cd . does nothing special (you go to where you are), etc. All unix shells require commands and their arguments to separated by whitespace, so cd... is not the cd command, and doesn't exist.
How to Use the cd Command on Linux - How-To Geek
Feb 7, 2024 · Within the first hour of using a Linux computer, you learn how to use the cd command included with Bash and other shells. Perhaps you had prior experience using it on another operating system and didn't need an explanation. It changes the current working directory, right? What else is there to know? Well, more than you'd think.
cd command in Linux with examples - LinuxConfig
Aug 30, 2021 · The cd command allows the user to change the directory in which a user is working at a given time. We’ll refer to this as the “present or current working directory” as we did in the introduction of this tutorial.