{"id":10076,"date":"2021-07-06T02:36:38","date_gmt":"2021-07-06T02:36:38","guid":{"rendered":"https:\/\/ded9.com\/?p=10076"},"modified":"2025-10-25T11:53:07","modified_gmt":"2025-10-25T11:53:07","slug":"how-to-change-the-default-windows-terminal-directory-in-powershell-and-cmd","status":"publish","type":"post","link":"https:\/\/ded9.com\/tr\/how-to-change-the-default-windows-terminal-directory-in-powershell-and-cmd\/","title":{"rendered":"How to Set the Default Starting Directory in Windows Terminal for PowerShell and Command Prompt"},"content":{"rendered":"<p><span style=\"font-size: 12pt;\">Windows Terminal is one of the most powerful command execution platforms In The Windows Operating System. If you know how it works, It Can Facilitate Many Different Processes And Functions.\u00a0<\/span><\/p>\n<p>This platform, accessible via PowerShell or <a href=\"https:\/\/ded9.com\/the-most-common-cmd-commands\/\">CMD<\/a>, can help users in areas that cannot be done through the graphical interface. Therefore, users, especially those who have previously worked with other existing platforms such as Linux, are expected to be familiar with the platform. It is prevalent.<\/p>\n<p>If you constantly use Windows Terminal, you must have noticed by now that this platform&#8217;s default directory is in the path of the username folder.<\/p>\n<p>However, it is possible to change the directory through the terminal using the &#8220;cd&#8221; command as quickly as possible or by holding down the Shift key and then right-clicking and selecting one of the Open PowerShell windows here or Open <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cmd.exe\" target=\"_blank\" rel=\"noopener\">CMD<\/a> window here options.<\/p>\n<p>You can change the directory, but doing it repeatedly can be a little tedious over time (especially since you also need constant access to the terminal through a particular directory).<\/p>\n<p>Fortunately, changing the default Windows terminal path is possible by adding a command line to the platform&#8217;s settings file. In this article, we will learn how to do it together.<\/p>\n<h1><span style=\"font-size: 18pt;\">Change the default terminal directory in PowerShell<\/span><\/h1>\n<p>First, open the Start menu, and after searching for Windows Terminal, click on the displayed application in the search list.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-10077 size-full\" title=\"PowerShell\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/111.jpg\" alt=\"Change the default terminal directory in PowerShell\" width=\"949\" height=\"677\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/111.jpg 949w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/111-300x214.jpg 300w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/111-768x548.jpg 768w\" sizes=\"(max-width: 949px) 100vw, 949px\" \/><\/p>\n<p><strong>Note:<\/strong> The terminal platform is not included by default in Windows; to use it, it must be downloaded as separate software and then installed.<\/p>\n<p><span style=\"font-size: 12pt;\">Click on this link to download this application from the Microsoft Store.<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-10078 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/Untitled.jpg\" alt=\"Click on this link to download this application from the Microsoft Store.\" width=\"1359\" height=\"723\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/Untitled.jpg 1359w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/Untitled-300x160.jpg 300w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/Untitled-1024x545.jpg 1024w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/Untitled-768x409.jpg 768w\" sizes=\"(max-width: 1359px) 100vw, 1359px\" \/><\/p>\n<p>After running the terminal software, click on the platform change icon, which is an arrow pointing downwards. Then, select the Settings option from the shortcut menu displayed. You will see that the default application selection window is displayed.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-10079 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/112.jpg\" alt=\"After running the terminal software, click on the platform change icon, which is an arrow pointing downwards. Then, select the Settings option from the shortcut menu displayed. You will see that the default application selection window is displayed.\" width=\"918\" height=\"322\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/112.jpg 918w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/112-300x105.jpg 300w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/112-768x269.jpg 768w\" sizes=\"(max-width: 918px) 100vw, 918px\" \/><\/p>\n<p>Suppose another page is displayed to change the default values after selecting the settings option. In that case, it is enough to click on the Open JSON file option at the bottom left of the same window to run the settings configuration file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10080 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/113.jpg\" alt=\"Suppose another page is displayed to change the default values after selecting the settings option. In that case, it is enough to click on the Open JSON file option at the bottom left of the same window to run the settings configuration file.\" width=\"830\" height=\"283\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/113.jpg 830w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/113-300x102.jpg 300w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/113-768x262.jpg 768w\" sizes=\"(max-width: 830px) 100vw, 830px\" \/><\/p>\n<p>You can now open Windows Terminal Settings with your favorite text editor software. In this article, the familiar name application Notepad has been used to simplify the instructions.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10081 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/114.jpg\" alt=\"You can now open Windows Terminal Settings with your favorite text editor software. In this article, the familiar name application Notepad has been used to simplify the instructions.\" width=\"724\" height=\"338\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/114.jpg 724w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/114-300x140.jpg 300w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><\/p>\n<p>After running the settings text file with the Notepad tool, drag the page down and find the &#8220;Make changes here to the PowerShell.exe profile&#8221; section.<\/p>\n<p><span style=\"font-size: 12pt;\">Place the mouse pointer at the end of the last visible value in this section and then type the comma (,) character.<\/span><\/p>\n<p>Now press the Enter key to move to the new line, and then type and add the following command to change the default directory. Remember that the PATH phrase must be replaced with the path you want, and all values \u200b\u200bmust be enclosed in quotation marks.<\/p>\n<h4>&#8220;startingDirectory&#8221;: &#8220;PATH&#8221;<\/h4>\n<p>For example, suppose we want to redirect the default directory to the Desktop. To do this, the new command line must be added to the settings as follows: (again, the Username must be replaced with your account name).<\/p>\n<h4>&#8220;starting directory&#8221;: &#8220;C:\\\\Users\\\\Username\\\\Desktop&#8221;<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10082 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/1-63.jpg\" alt=\"For example, suppose we want to redirect the default directory to the Desktop. To do this, the new command line must be added to the settings as follows: (again, the Username must be replaced with your account name).\" width=\"945\" height=\"374\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/1-63.jpg 945w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/1-63-300x119.jpg 300w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/1-63-768x304.jpg 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/p>\n<p>After redirecting, click the Save button from the File menu to save the settings. The default directory of the PowerShell platform via the Windows terminal tool will change to the specified path every time you open it.<\/p>\n<h1><span style=\"font-size: 18pt;\">Change the default terminal directory in the Command Prompt<\/span><\/h1>\n<p>Changing the default terminal directory on the Command Prompt platform, or CMD for short, is done just like PowerShell, except that the command for the new path must be added to another part of the configuration text file.<\/p>\n<p>To do this, rerun the previous instructions and open the Windows terminal configuration file using Notepad software.<\/p>\n<p>Now, drag the page down and find the &#8220;Make changes here to cmd.exe profile&#8221; section.<\/p>\n<p>Now, add the command line for the new directory according to the instructions mentioned in the previous section and save the file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10083 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/115.jpg\" alt=\"Change the default terminal directory in the Command Prompt\" width=\"910\" height=\"353\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/115.jpg 910w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/115-300x116.jpg 300w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/115-768x298.jpg 768w\" sizes=\"(max-width: 910px) 100vw, 910px\" \/><\/p>\n<h1><span style=\"font-size: 18pt;\">Delete the directory. Add and restore the default path.<\/span><\/h1>\n<p>This action is also possible by deleting the new command line added to the desired platform (PowerShell or CMD).<\/p>\n<p>Open the Windows terminal settings file again, as described earlier. Go to the platform, select the entire directory channel link, and delete it by pressing the Backspace key on the keyboard. Do not forget to delete the comma (,) character.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10084 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/116.jpg\" alt=\"Delete the directory. Add and restore the default path.\" width=\"909\" height=\"353\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/116.jpg 909w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/116-300x117.jpg 300w, https:\/\/ded9.com\/wp-content\/uploads\/2021\/07\/116-768x298.jpg 768w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><\/p>\n<h2>FAQ<\/h2>\n<div id=\"rank-math-rich-snippet-wrapper\"><div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-1\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How can I change the default starting directory in Windows Terminal?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Open Windows Terminal, click the down arrow (v) in the title bar, and select \"Settings.\" In the settings UI, navigate to the profile you wish to modify (e.g., PowerShell or Command Prompt). Under the \"Starting directory\" section, enter your desired path, such as C:UsersYourUsernameDocuments. Save the changes, and the terminal will open to this directory by default.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-2\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Can I set different starting directories for each profile?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes, you can configure unique starting directories for each profile. In the settings UI, select each profile individually and specify a different path in the \"Starting directory\" field. This allows you to have PowerShell open in one directory and Command Prompt in another, tailored to your workflow needs.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-3\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Is there an alternative method to change the starting directory using the settings.json file?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Absolutely. If you prefer editing the configuration file directly, open the settings.json file by clicking the down arrow (v) in the title bar and selecting \"Settings\" &gt; \"Open JSON file.\" Locate the profile you wish to modify and add or edit the \"startingDirectory\" property with your desired path, like \"startingDirectory\": \"C:\\Users\\YourUsername\\Documents\". Save the file, and the changes will take effect the next time you open the terminal.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Windows Terminal is one of the most powerful command execution platforms In The Windows Operating System. If you know how it works, It Can Facilitate Many Different Processes And Functions.\u00a0 This platform, accessible via PowerShell or CMD, can help users in areas that cannot be done through the graphical interface. Therefore, users, especially those who [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":10085,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[96,70],"tags":[4910],"class_list":["post-10076","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-network","category-windows","tag-powershell"],"acf":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/posts\/10076","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/comments?post=10076"}],"version-history":[{"count":7,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/posts\/10076\/revisions"}],"predecessor-version":[{"id":263986,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/posts\/10076\/revisions\/263986"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/media\/10085"}],"wp:attachment":[{"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/media?parent=10076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/categories?post=10076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ded9.com\/tr\/wp-json\/wp\/v2\/tags?post=10076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}