cd, sometimes also available as chdir is a command line command to change the current working directory in operating systems such as Unix, DOS, OS/2, AmigaOS, Windows, and Linux. It is also available for use in shell scripts and batch files. chdir is the system call which changes the working directory, as defined by POSIX. CHDIR is also a Visual Basic function which changes the working directory.