Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




6.5. Your program's working directory

Each time you start your program with run, it inherits its working directory from the current working directory of gdb. The gdb working directory is initially whatever it inherited from its parent process (typically the shell), but you can specify a new working directory in gdb with the cd command.

The gdb working directory also serves as a default for the commands that specify files for gdb to operate on. Refer to Section 17.1 Commands to specify files.

cd directory

Set the gdb working directory to directory.


Print the gdb working directory.

  Published under the terms of the GNU General Public License Design by Interspire