How to export iTerm2 Profiles

If you have a look at Preferences -> General you will notice at the bottom of the panel, there is a setting Load preferences from a custom folder or URL:. There is a button next to it Save settings to Folder.

So all you need to do is save your settings first and load it after you reinstalled your OS.

If the Save settings to Folder is disabled, select a folder (e.g. empty) in the Load preferences from a custom folder or URL: text box.

In iTerm2 3.3 on OSX the sequence is: iTerm2 menu, Preferences, General tab, Preferences subtab


I didn't touch the "save to a folder" option. I just copied the two files/directories you mentioned in your question to the new machine, then ran defaults read com.googlecode.iterm2.

See https://apple.stackexchange.com/a/111559


Current version of iterm2 (3.4.10, as of my answer) allows to export the whole profile settings as a json file, which will include everything necessary to rebuild the environment such as colors, fonts, spacing, Command, Working Directory, keymaps, scrollbars, etc.

To do so:

  1. main menu -> Profiles -> Open Profiles...
  2. again, select the profile of interest and press Edit Profiles...
  3. lower left corner, choose "Other Actions..." -> "Save Profile as Json..."

To re-import the profile there's obviously also the "Import Json Profiles..." entry.


It isn't the most obvious workflow. You first have to click "Load preferences from a custom folder or URL". Select the folder you want them saved in; I keep an appsync folder in Dropbox for these sorts of things. Once you have selected the folder, you can click "Save settings to Folder". On a new machine / fresh install of your OS, you can now load these settings from the folder. At first I was sure that loading preferences would wipe out my previous settings, but it didn't.

Tags:

Iterm

Iterm2