Windows Terminal is an important tool for supporting command-line applications like Command Prompt and Windows PowerShell. It backs up all global data to a file named settings.json. While this is the backup created by Windows Terminal, you might need to keep a local copy. To learn the procedure for creating a local backup of Windows terminal settings, please read this article.
Windows Terminal settings creates its own backup, but it is advisable to keep your own local copy for security. This can be done by copying the settings.json file to a local location on your computer. When needed, you can use this file to restore the Windows Terminal settings.
The reason you should back up Windows Terminal settings is in case you wish to replicate the settings on a different computer or reset Windows Terminal. In these cases, the existing file will not work, but the local duplicate copy will be useful.
How to backup and restore Windows Terminal settings
You can back up the Windows Terminal settings using File Explorer or Command Prompt. You will basically be backing up the settings.json file to a local location on your computer and using this again would you wish to restore the Terminal settings.
1] Using File Explorer
Before starting with any procedure, we will need the file path to the location where you wish to back up the Windows Terminal settings.json file. For the sake of this article, let us assume the location to be C:\Users\kk010\Music\Backup location. Here kk010 is my username – and your will be different. To find the location of any file or folder, open the Run window, and drag the file to its field.
The procedure to backup Windows Terminal settings using File Explorer is as follows:
Press Win+R to open the Run window.
In the Run window, copy-paste the following and hit Enter:
%LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
This will open the LocalState folder.
Copy the settings.json file.
Go to this location:
C:\Users\kk010\Music\Backup
Right-click in the open space and select Paste.
The file in the second folder will be your backup.
When you wish to restore the file, reverse the steps taken as follows:
Copy the backup settings.json file from the folder
C:\Users\kk010\Music\Backup
Now, go to the Run window and copy-paste the location:
%LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
Hit Enter to open the location.
Paste the settings.json file at this location.
Reboot your system.
2] Using Command Prompt
Command Prompt makes a lot of complicated procedures easier. To back up the Windows Terminal settings file follow these steps:
The syntax for the Command Prompt command to backup Windows Terminal settings will be:
copy /y /v %LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json <path>
Where <path> is the target location.
In the example we are using in this article, the command line would become:
copy /y /v %LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json C:\Users\kk010\Music\Backup location
The above-mentioned command was to back up the data.
If you wish to restore it, the syntax will be:
copy /y /v <path> %LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
Where <path> is the target location.
Thus, the command line would become
copy /y /v C:\Users\kk010\Music\Backup location
%LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
Please reboot the system after restoring the file.
How do I export Windows Terminal settings?
Windows Terminal Settings are stored in the settings.json file. If you wish to export Windows terminal settings from one computer to another, then it is possible by transferring the settings.json file to another computer. This can be done using a USB disk or sending it online.
Where are Windows Terminal settings stored?
The settings.json file is the file for Windows Terminal Settings. Its location is C:\Users\<username>\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
.
Where <username> is the username of the system. C: is the system drive.
How do I reinstall Windows Terminal?
You can reinstall Windows Terminal settings through Windows PowerShell. The procedure is as follows.
Search for Windows PowerShell in the Windows Search bar.
Click on Run as administrator in the right pane to open the elevated Command Prompt window.
Copy-paste the following command into it and hit Enter:
get-appxpackage Microsoft.WindowsTerminal -allusers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Reboot your system.
I hope it helps! Please let us know in the comment section.