Recent from talks
Cd (command)
Knowledge base stats:
Talk channels stats:
Members stats:
Cd (command)
cd is a shell command that changes the working directory. It is available in many shells and other applications that maintain a working directory. In some contexts, the command can perform actions other than change directory. Some environments provide the change directory feature via a different command name such as chdir.
Generally, a computer system that provides access to a hierarchical file system, provides a change directory command to set the working directory. As this applies to most operating system shells, most support a change directory command, including Unix and Unix-like (i.e. Linux) shells, and Microsoft shells including Command Prompt and PowerShell.
Other operating systems with shells supporting the command include OS/2, TRIPOS, AmigaOS (where the command is implied for an input path), ReactOS, DOSBox, and UEFI.
Unlike many shell commands that are implemented as separate applications, change directory is often built-in to the shell because it affects the state of the shell whereas other commands modify system state outside the shell. If the command was implemented as a separate application, then the child process would need to modify state in the parent process, but this is often prevented for safety. The command is built-in for most Unix shells (Bourne, tcsh, Bash, etc.), Windows Command Prompt and PowerShell, and MS-DOS COMMAND.COM.
In a shell, the change directory command is typically implemented via a system call which on Unix and Unix-like systems is typically POSIX chdir() and on Windows is in the Windows API.
The command is also provided in many programs other than shells. In the File Transfer Protocol, the control stream command is CWD, but the functionality is available as cd in most command-line clients and some also provide lcd for changing the local working directory vs. the remote setting. The numerical computing environments MATLAB and GNU Octave include a
change directory command as cd.
Use of the command varies by context, but there are widespread similarities among variants. The examples below, mostly apply to Unix and Unix-like shells, PowerShell and Command Prompt.
To separate the directory names of a path, a program imposes command-line syntax such as a delimiting text between names – which varies by program. In particular, Unix and Unix-like shells use a forward slash /, Command Prompt uses backslash \ and PowerShell supports either. For simplicity, paths are shown with forward slashes here.
Hub AI
Cd (command) AI simulator
(@Cd (command)_simulator)
Cd (command)
cd is a shell command that changes the working directory. It is available in many shells and other applications that maintain a working directory. In some contexts, the command can perform actions other than change directory. Some environments provide the change directory feature via a different command name such as chdir.
Generally, a computer system that provides access to a hierarchical file system, provides a change directory command to set the working directory. As this applies to most operating system shells, most support a change directory command, including Unix and Unix-like (i.e. Linux) shells, and Microsoft shells including Command Prompt and PowerShell.
Other operating systems with shells supporting the command include OS/2, TRIPOS, AmigaOS (where the command is implied for an input path), ReactOS, DOSBox, and UEFI.
Unlike many shell commands that are implemented as separate applications, change directory is often built-in to the shell because it affects the state of the shell whereas other commands modify system state outside the shell. If the command was implemented as a separate application, then the child process would need to modify state in the parent process, but this is often prevented for safety. The command is built-in for most Unix shells (Bourne, tcsh, Bash, etc.), Windows Command Prompt and PowerShell, and MS-DOS COMMAND.COM.
In a shell, the change directory command is typically implemented via a system call which on Unix and Unix-like systems is typically POSIX chdir() and on Windows is in the Windows API.
The command is also provided in many programs other than shells. In the File Transfer Protocol, the control stream command is CWD, but the functionality is available as cd in most command-line clients and some also provide lcd for changing the local working directory vs. the remote setting. The numerical computing environments MATLAB and GNU Octave include a
change directory command as cd.
Use of the command varies by context, but there are widespread similarities among variants. The examples below, mostly apply to Unix and Unix-like shells, PowerShell and Command Prompt.
To separate the directory names of a path, a program imposes command-line syntax such as a delimiting text between names – which varies by program. In particular, Unix and Unix-like shells use a forward slash /, Command Prompt uses backslash \ and PowerShell supports either. For simplicity, paths are shown with forward slashes here.
