This question already has an answer here:

I updated my Ubuntu but it crashed during installation and I was not able to recover it (my hard drive crashed). I changed my hard drive and re-install ubuntu

I saved all my important docs (bookmark, documents etc...)

One thing I was unable to recover is the profile from my shell (I changed the color scheme, title, number of lines scrollback etc...)

Where can I save this so next time something happens I won't have to set my terminal settings all over again?

marked as duplicate by Charles Green, Videonauth, Zanna command-line Oct 24 '17 at 12:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 33 down vote accepted
+100

GNOME Terminal profiles are stored in: ~/.gconf/apps/gnome-terminal/profiles.

(You might want to back up the whole .gconf directory, though.)

Newer gnome-terminal (3.8+ I think) stores its config in dconf instead gconf.

gsettings list-recursively | grep -i org.gnome.Terminal

More info about the change https://askubuntu.com/a/91409/79266

  • Unfortunately this doesn't list the profile settings, only the global ones and the profile IDs. – egmont Oct 22 '17 at 10:12

In case someone lands here looking for a way to change the terminal settings from console (eg for vagrant provisions), the gconftool-2 command can be used. For example:

gconftool-2 --set /apps/gnome-terminal/profiles/Default/background_darkness --type=float 0.50

You can get the relevant setting keys from the ~/.gconf/apps/gnome-terminal/profiles/Default/%gconf.xml file.

I don't think this will change the gnome terminal background color etc. but it will edit BASH's behavior. The BASH config files for the individual user are stored in the .bashrc file in your home directory. Note that since it is a dot file it is hidden by default. Use ls -a from the terminal to see the file or invoke view hidden files in nautilus to reveal it. There is also a .profile file but it is often easier to keep all your edits in .bashrc.

Now learning how to config BASH (or other shell) is a whole other topic.

If you have a separate /home partition and if u don't format it while installing Ubuntu, all your user settings will remain intact (since all user settings will be stored in /home partition). Its always advisable to create multiple partitions (one independent partition for / so that while reinstall only that partition can be formatted)

Not the answer you're looking for? Browse other questions tagged or ask your own question.