{"id":229155,"date":"2021-04-16T16:30:48","date_gmt":"2021-04-16T13:30:48","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-change-the-default-directory-in-windows-terminal\/"},"modified":"2021-04-16T16:30:48","modified_gmt":"2021-04-16T13:30:48","slug":"how-to-change-the-default-directory-in-windows-terminal","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-change-the-default-directory-in-windows-terminal\/","title":{"rendered":"#How to Change the Default Directory in Windows Terminal"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2eaecb29190\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2eaecb29190\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-change-the-default-directory-in-windows-terminal\/#Change_PowerShells_Default_Directory_in_Windows_Terminal\" >Change PowerShell\u2019s Default Directory in Windows Terminal<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-change-the-default-directory-in-windows-terminal\/#Change_Command_Prompts_Default_Directory_in_Windows_Terminal\" >Change Command Prompt\u2019s Default Directory in Windows Terminal<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-change-the-default-directory-in-windows-terminal\/#Change_Ubuntus_Default_Directory_in_Windows_Terminal\" >Change Ubuntu\u2019s Default Directory in Windows Terminal<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-change-the-default-directory-in-windows-terminal\/#How_to_Reset_the_Default_Directory_in_Windows_Terminal\" >How to Reset the Default Directory in Windows Terminal<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#How to Change the Default Directory in Windows Terminal&#8221;<\/strong><\/p>\n<div>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-720539 size-full\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/change-default-directory-terminal-featured.png?width=1200&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Windows Terminal with a Command Prompt shell.\" width=\"650\" height=\"300\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Windows Terminal uses your current user directory as the default directory when you open it. However, you can change this to any directory on your Windows PC. We\u2019ll show you how to change the default working directory for PowerShell, Command Prompt, and Ubuntu shell.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Change_PowerShells_Default_Directory_in_Windows_Terminal\"><\/span>Change PowerShell\u2019s Default Directory in Windows Terminal<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>PowerShell is the default shell that opens when you launch Windows Terminal. Like other shells, this one uses your current user directory as the default.<\/p>\n<p>You can change this default directory by adding a single line of code in the Windows Terminal\u2019s settings file.<\/p>\n<p>To do this, open the \u201cStart\u201d menu, search for \u201cWindows Terminal,\u201d and click the <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a> in the results.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-720540\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/launch-windows-terminal.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Open Windows Terminal\" width=\"650\" height=\"239\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Click the down-arrow icon at the top of the Windows Terminal window, and then select \u201cSettings.\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-720541\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/launch-terminal-settings.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Access Windows Terminal settings\" width=\"650\" height=\"391\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Windows will ask what app you want to open the settings file with. You can choose any code (or plain-text) editor in the list, but we\u2019ll stick with Notepad for the sake of simplicity. Click \u201cNotepad\u201d in the list and hit \u201cOK.\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-720542\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/open-settings-notepad.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Open Windows Terminal's settings in Notepad\" width=\"583\" height=\"562\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>When the settings file opens in Notepad, scroll to the \u201cMake changes here to the powershell.exe profile\u201d section.<\/p>\n<p>Put your cursor at the end of the last value in this section and type a , (comma).<\/p>\n<p>For example, if the last value in that section was:<\/p>\n<pre>\"Hidden\": false<\/pre>\n<p>It would now look like this (See the comma at the end.):<\/p>\n<pre>\"Hidden\": false,<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-720543\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/add-comma.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Add a comma after a value in Windows Terminal\" width=\"650\" height=\"349\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Now, press Enter to add a new line. Type the following code in this line, replacing PATH with the path to your new default directory.<\/p>\n<p>Make sure that your directory path is enclosed with double quotes. Also, where you have a single slash in the path, make it a double slash.<\/p>\n<pre>\"startingDirectory\": \"PATH\"<\/pre>\n<p>For instance, to set your desktop as the default directory, you\u2019d type the following line of code in the settings file (replacing \u201cUsername\u201d with your username):<\/p>\n<pre>\"startingDirectory\": \"C:\\Users\\Username\\Desktop\"<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-720544\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/change-powershell-default-directory.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Change PowerShell's default directory\" width=\"650\" height=\"366\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>After entering the path, click File &gt; Save in Notepad to save your changes.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-720545\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/save-windows-terminal-settings.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Save Windows Terminal settings\" width=\"560\" height=\"403\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Now, when you open a new PowerShell tab in Windows Terminal, it\u2019ll use your newly specified directory as the default directory.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Change_Command_Prompts_Default_Directory_in_Windows_Terminal\"><\/span>Change Command Prompt\u2019s Default Directory in Windows Terminal<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can change Command Prompt\u2019s default directory using the same steps as those listed above. The only difference is that you need to add the new directory path in the Command Prompt section of the settings file.<\/p>\n<p>To do this, open Windows Terminal\u2019s settings like you did previously.<\/p>\n<p>Scroll down to the \u201cMake changes here to cmd.exe profile\u201d section.<\/p>\n<p>Put your cursor after the last value in this section, and type a , (comma). Press Enter to add a new line and type the following. Be sure to replace PATH with your new directory path.<\/p>\n<pre>\"startingDirectory\": \"PATH\"<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-720546\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/change-cmd-default-directory.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Change Command Prompt's default directory\" width=\"650\" height=\"352\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Select File &gt; Save in Notepad to save your changes.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Change_Ubuntus_Default_Directory_in_Windows_Terminal\"><\/span>Change Ubuntu\u2019s Default Directory in Windows Terminal<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can use the same line of code that you used above to change Ubuntu\u2019s (Linux) default directory in Windows Terminal.<\/p>\n<p>To do this, open the Windows Terminal\u2019s settings file.<\/p>\n<p>Scroll to the section where it says \u201cName : Ubuntu.\u201d<\/p>\n<p>Put your cursor after the last value in this section and add a , (comma).<\/p>\n<p>Press Enter to add a new line and type this code in that line. Replace PATH with the path to your new default directory.<\/p>\n<pre>\"startingDirectory\": \"PATH\"<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-720547\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/change-ubuntu-default-directory.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Change Ubuntu's default directory\" width=\"650\" height=\"278\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>In your Notepad window, click File &gt; Save to save your changes.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"How_to_Reset_the_Default_Directory_in_Windows_Terminal\"><\/span>How to Reset the Default Directory in Windows Terminal<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To revert to the original default directory in Windows Terminal, you just need to remove your newly added code from the settings file.<\/p>\n<p>Start by opening Windows Terminal and then launching the settings file.<\/p>\n<p>Scroll to the shell that you want to reset the default directory for.<\/p>\n<p>Use your mouse to highlight the entire line of code that you added previously, then press Backspace to delete that line.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-720548\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/reset-default-directory-terminal.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Reset the default directory in Windows Terminal\" width=\"650\" height=\"263\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Also, be sure to remove the , (comma) that you added to the end of the last value in that section.<\/p>\n<p>Finally, click File &gt; Save in Notepad to save your changes.<\/p>\n<p>You\u2019re all set.<\/p>\n<hr\/>\n<p>Did you know that\u00a0Windows Terminal offers many customization options? You can use these options to change how this tool looks and works on your computer.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>How to Customize the New Windows Terminal App<\/em><\/strong><\/p>\n<\/div>\n<p><script>\n setTimeout(function(){\n  !function(f,b,e,v,n,t,s)\n  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n  n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n  n.queue=[];t=b.createElement(e);t.async=!0;\n  t.src=v;s=b.getElementsByTagName(e)[0];\n  s.parentNode.insertBefore(t,s) } (window, document,'script',\n  'https:\/\/connect.facebook.net\/en_US\/fbevents.js');\n   fbq('init', '335401813750447');\n   fbq('track', 'PageView');\n  },3000);\n<\/script><\/p>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.howtogeek.com\/720536\/how-to-change-the-default-directory-in-windows-terminal\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#How to Change the Default Directory in Windows Terminal&#8221; Windows Terminal uses your current user directory as the default directory when you open it. However, you can change this to any directory on your Windows PC. We\u2019ll show you how to change the default working directory for PowerShell, Command Prompt, and Ubuntu shell. Change PowerShell\u2019s&#8230;<\/p>\n","protected":false},"author":1,"featured_media":229156,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/03\/change-default-directory-terminal-featured.png?height=200p&trim=2,2,2,2","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-229155","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/229155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=229155"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/229155\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/229156"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=229155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=229155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=229155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}