MacOS – How to change the apperance of terminal to make it indentical to Ubuntu’s terminal

customizationmacosterminal

I like using the default terminal application, but as I use both Ubuntu and OS X a lot I want to make them behave and look the same. How can I change the Mac terminal to make as identical as possible to the Ubuntu terminal?

edit: A similar post Can I make my Mac OS X Terminal color items according to syntax, like the Ubuntu terminal? does not answer my question for the following reasons:

  • It does not tell me what background color Ubuntu uses or if the colors given are the default colors that Ubuntu uses.
  • Gives me a multi line command prompt (I really prefer the single line prompt)
  • It talks about syntax highlighting I am interested in other changes as well such as copying and pasting behavior.
  • Does not properly explain how export PS1="\n$C_LIGHTGREEN\u$C_DARKGRAY@$C_BLUE\h $C_DARKGRAY: $C_LIGHTYELLOW\w\n$C_DARKGRAY\$$C_DEFAULT functions.
    • From what I can tell in changes the prompt so that newline is light green, user appears next in dark gray and blue(?), host name appears in darkgrey, something else is light yellow(?), current working directory is darkgray and a newline is made (?) $(or # for root) is a default color.
    • Looking at this website asnwers a bit of my question.

Best Answer

You'll need to change the shell settings to match your current Ubuntu terminal. Simple way would be to make your local .bashrc match the one used by Ubuntu (see here for an example of the Ubuntu default .bashrc.) You can either plug the settings in to a .bashrc file for all shells, or use a .bash_profile in your home folder to set Terminal preferences for login shells. This post has more details on how to create these files.

Last, I imagine your Ubuntu terminal sessions aren't on a white screen - Adding in the xterm-color settings will provide colored text, but won't affect the background color. I generally start by making the "Homebrew" Terminal display setting the default in OS X, to get black background + green text, then tweak from there.

Poke around in the other settings you have for yourself on Ubuntu - any default keyboard shortcuts, etc. will be in .profile or .bash_profile, and those can be copied into the same folder on your Mac. If you want to get really picky you can even install Ubuntu Mono (the default Ubuntu terminal font) on your Mac, and use it as the default font for Terminal.