Finally found it! As it turns out, I was searching for the wrong term. Apparently the TTYs run on a framebuffer, which is what the colors get changed in.
From this blog post but customized to use the railscasts theme colors, add the following to ~/.bashrc
:
if [ "$TERM" = "linux" ]; then
echo -en "\e]P0232323" #black
echo -en "\e]P82B2B2B" #darkgrey
echo -en "\e]P1D75F5F" #darkred
echo -en "\e]P9E33636" #red
echo -en "\e]P287AF5F" #darkgreen
echo -en "\e]PA98E34D" #green
echo -en "\e]P3D7AF87" #brown
echo -en "\e]PBFFD75F" #yellow
echo -en "\e]P48787AF" #darkblue
echo -en "\e]PC7373C9" #blue
echo -en "\e]P5BD53A5" #darkmagenta
echo -en "\e]PDD633B2" #magenta
echo -en "\e]P65FAFAF" #darkcyan
echo -en "\e]PE44C9C9" #cyan
echo -en "\e]P7E5E5E5" #lightgrey
echo -en "\e]PFFFFFFF" #white
clear #for background artifacting
fi
The virtual terminals (the ones you get to with Ctrl Alt F1-9) go back to the roots of Linux. Remember that Linux was originally a command-line only system and designed for multiple users. The idea was that each user could log into a single tty. This would not happen on the same physical machine of course, think of servers that many computer terminals would connect to. Each user would connect using a different computer and the server log them in to a tty.
This has nothing to do with the tty
command which is part of coreutils
. The tty
command is simply a tool that lets you know the name of the terminal you are currently using.
The "terminal" (actually called a "terminal emulator") is simply a GUI program that mimics the old behavior. It lets you run a shell (bash in the default Ubuntu) from within your X session.
The main point is that both the virtual terminals and the terminal emulators provide you with a command line interface, a shell. They are basically the same thing. The only important difference from a practical point of view is that the terminal emulators run interactive, non-login shells while if you drop into a tty and login there, you will run an interactive, login shell. For more information on the differences between these two types of shell, see here.
I suggest you also read this excellent Q&A on Unix & Linux:
What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?.
Best Answer
tty
is one of those funky Unix commands that prints the name of the terminal connected to standard input.TTY's are text-only terminals commonly used as a way to get access to the computer to fix things, without actually logging into a possibly b0rked desktop.
Related: What is tty7 in the commandline?
By default Ubuntu has 7 tty's.
1-6
are command line only and7
runs your X session (your normal desktop).1
, GUI desktop on2
and command lines on3-7
.To access them, use this keyboard shortcut:
Ctrl + Alt + F1 (or F3 on 17.10 and newer)
(changing F1 to F1-F6 to access the terminal that you want)
To get back to your GUI session (the normal desktop):
Ctrl + Alt + F7 (or F2 on 17.10 and newer)