Linux – what is the difference between terminal in Mac OS X and Ubuntu

linuxmacosterminalUbuntu

Both Mac OS X and Ubuntu (and other Linus OS) has terminal / command line.

Are these terminal identical across different OS? If not, what are the important difference?

Best Answer

A Terminal emulator provides an interface to run a shell, which again is an interface to access your operating system functions.

Terminals used to be real machines, e.g. a monitor with a keyboard attached, which sent your keystrokes to the actual computer at the other end, and receiving output from this computer. For example, the famous VT100:

enter image description here

Nowadays, this is emulated by those applications, like the Terminal.app on OS X, or GNOME Terminal for the GNOME graphical interface on Linux distributions.

As it's decoupled from the shell that you can run (e.g. bash, zsh, ...), you are free to use any other terminal emulator. For example, on OS X, you can use iTerm 2, which offers a bit more than the normal terminal application.

As the terminal is the bridge between your GUI and the text-only shell, its functionality should go beyond accepting keyboard input and displaying output from the shell. A terminal should supply you with means of:

  • copying and pasting to the GUI
  • sending special commands to the shell (so called escape sequences; your terminal will for example map Cmd - Right Arrow to an appropriate shell sequence to go to the end of the line*)
  • allowing other shortcuts with hotkeys
  • allowing the shell to track the mouse
  • allowing multiple tabs with different shells running at the same time
  • allowing you to drag a file icon to the shell to get its real path
  • notifying the GUI of events (such as a blinking screen, or Growl output)
  • etc.

To sum it up: Different terminals offer different functionality with regards to how they interact with your operating system on the one hand, and the shell on the other hand. You can find a comparison of terminal emulators on Wikipedia.

That being said, there isn't an important difference. Most people set up terminals to their liking, e.g. some like a transparent background, whereas others don't. Some like them to display their shell black on white, others rather like it green on black.**
Some terminals allow you to set up different keyboard shortcut profiles, or even other profiles that launch different shells on startup, with a different windows size, etc.


* Note that this is a rather simplified statement. The terminal just needs to find a way to map special keys – especially on Macs, where there's a Command key – to commands a shell can understand.

** This is also a functionality of the terminal: Displaying colors. You can actually tweak your terminal to show stuff the shell intended to be green as red instead. It's primarily a matter of customization.

Related Question