The console tag has no wiki summary.
233
votes
4answers
41k views
What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?
I think these terms almost refer to the same thing, when used loosely:
terminal
shell
tty
console
What exactly do each of these terms refer to?
24
votes
1answer
432 views
What happens when Ctrl + Alt + F<Num> is pressed?
I am looking for an explanation of what happens in Linux when this key combination is pressed to change the current terminal. In particular, what software component intercepts this key combination and ...
12
votes
2answers
2k views
Linux: Difference between /dev/console , /dev/tty and /dev/tty0
On a Linux system, what is the difference between /dev/console , /dev/tty and /dev/tty0 ?
What is their respective use? How do they compare?
12
votes
2answers
516 views
Can I configure bash to execute “clear” before every command typed in the console?
I would like to configure bash to execute clear command every time I type some command in the terminal (before executing my command). How can I do that?
I'm using Debian Linux.
10
votes
1answer
2k views
TTY On External Monitor
When using my laptop at home, I usually use an external monitor, keyboard, and mouse with my laptop's screen as a second monitor. This is all easily configured using a nice GNOME utility that I ...
9
votes
2answers
6k views
How to colorize output of ls ?
I'm running CentOS in Linux text mode. When I run the command ls /usr/, the output is too hard to read (dark blue on black). How can I change the text coloring?
9
votes
1answer
302 views
Redirect linux console on boot
Is it possible on boot to redirect the console output to a screen session? The server has no monitor attached, and I'd like to be able to see the primary console output. I've seen other posts about ...
8
votes
4answers
2k views
How to get file to a host when all you have is a serial console?
When all you have is a serial console (say via telnet through a terminal server), what methods can be used to transfer files in/out of a host?
Cut/paste works for the small/printable stuff and I've ...
7
votes
2answers
1k views
How to define a Compose Key in terminal (no desktop environment)?
I would like to define a compose key on my system (Debian Sid "Wheezy"). I have no Xorg (and don't want any desktop environment). Only in terminal.
I would like to set it up on my Alt-Gr key (right ...
7
votes
2answers
353 views
How to map a console keyboard layout to a X keyboard layout in Linux
In my distribution (Slackware 13.37), the console keyboard layout is chosen among some of those available in /usr/share/kbd/keymaps ' sub directories, coming from the kbd package.
Under X instead ...
6
votes
7answers
5k views
Disable screen blanking on text console
I'm running linux clusters, mostly on SLES10. The servers are mostly blades, accessed via remote console. There is a real console in the server room, but switched off.
I would like to disable the ...
6
votes
3answers
644 views
Shutdown from login prompt in tty
Suppose I boot a Linux machine without GUI. When it displays a tty login prompt, can I shutdown the machine with a keyboard sequence?
Of course I could type in my username and password and then sudo ...
6
votes
4answers
1k views
How to clear terminal completely?
When we use clear command or Ctrl+L in terminal, it clears terminal but we can still scroll back to view the last used commands. Is there a way to completely clear the terminal?
6
votes
2answers
1k views
What does raw/unraw keyboard mode mean?
In the magic sysrq key combinations, there is the combination alt+sysrq+r which, according to wikipedia, does the following:
Switch the keyboard from raw mode, the mode used by programs such as
...
6
votes
1answer
275 views
Adjusting keyboard sensitivity in a command line terminal?
When using a tty login shell by entering Ctrl-Alt-F1 from an Ubuntu 12.04 install on a laptop the keyboard seems overly sensitive and if my finger lingers for a moment on a button I end up with ...
6
votes
2answers
2k views
Viewing system console messages in GUI
Under Linux, is it possible to view error messages that show up on the text mode terminal while in GUI mode, instead of having to press Ctrl+Alt+F1 or Ctrl+Alt+F2 to view the messages every time and ...
6
votes
3answers
3k views
How do I connect a serial terminal to a KVM instance?
Perhaps I'm misunderstanding what KVM is capable of, but the ability to add/remove hardware on the VM seems to imply I can add a serial port that then acts as a terminal.
So, my questions are:
...
6
votes
1answer
453 views
using curses with virtual terminals
I'm trying to use Curses on Fedora 12 to output status information to a virtual console (one of the terminals you can get to by pressing CtrlAltFx).
When I start up my application on one of the ...
5
votes
3answers
407 views
How to log to file and to console
I know that I can log to file by adding
> log.txt
to the end of a command but how can I log to file AND to console?
5
votes
2answers
9k views
Command line to return to the GUI after Ctrl-Alt-F1?
I'm unable to return to the GUI with Ctrl-Alt-F7 (or any of the 12 function keys). I have some unsaved work and I don't want to lose them. Are there any other key combinations that will allow me to ...
5
votes
1answer
85 views
Why are multiple command-line terminal consoles available/running at the same time on RHEL systems?
I'm studying for the RHCSA and am trying to wrap my mind around a seemingly basic concept: terminal consoles. I don't understand how/why RHEL systems make 6 terminal consoles (/dev/ttyN) available ...
5
votes
1answer
247 views
Send a command from the console to a running X server
Is it possible to send a command from the console, say tty1, to the terminal currently occupied with X (in my case tty7 as I use Debian), to tell for example mplayer to play a movie?
Edit - made a ...
5
votes
1answer
907 views
What is the difference between a Console, Shell, Terminal, Terminal emulator, Terminal multiplexer, and a Window manager?
For example. What is the difference between a default 'interface/console' of FreeBSD/archlinux, vs Terminal, vs Terminal emulator like Xterm, vs Terminal multiplexer like tmux, vs Window manager like ...
5
votes
2answers
190 views
Can I start my main desktop graphical session remotely?
So my workstation at work got rebooted and I'm currently not logged in physically there with a graphical session. I have ssh access to it, and I can start a new X windows session and use my graphical ...
5
votes
1answer
1k views
Show a notification across all running X displays
Using the command line, I'd like show a notification on every running X display. ( and running console )
Something like:
notify-send-all 'Warning' 'Nuclear launch in 5 minutes, please evacuate'
Is ...
5
votes
2answers
343 views
Font getting reset in virtual console on GNU/Linux
I have set a custom font on my virtual console (vt1) using the following command:
shell> setfont ter-114f
If I switch to X (using Ctrl+Alt+F7) and come back to the virtual console (using ...
5
votes
1answer
645 views
Cannot switch to TTYs or back
I just upgraded to Mint 13 - KDE x64
I am unable to switch to ttys by using the CtrlAltF1 .. F6 keys. The gettys are running and I can switch to the terminals with the sudo chvt 1 command.
I have ...
5
votes
1answer
265 views
Console ScreenSaver without X11
I'm trying to setup a very slimmed down console only Debian system to act as a simple slideshow photo display. I know that it is possible to show graphics (I guess using the framebuffer) in the ...
5
votes
1answer
266 views
Cannot switch to console anymore after using Alt_R as mod4
I'd like to use the right ALT key as 'mod4' (most notably because, by default, the 'awesome' window manager is using mod4 as a modifier for most WM commands and I like that idea a lot).
However I've ...
5
votes
1answer
626 views
Switch display output without rebooting but not in Xorg
My graphic card has two output (VGA and DVI). Is it possible to switch from one to the other without rebooting ?
It works in Xorg by restarting the X server (I guess it should be doable with xrandr ...
4
votes
2answers
5k views
Refresh env variables after editing bashrc file
I frequently edited the .bashrc file to export new environment variables.
Rather than close the console and start a new one to refresh the env variables, is there a convenient way to refresh?
4
votes
2answers
142 views
How to modify linux console prompt line ( for a while )
For example I typed such commands:
user@my-machine:~$ cd ABC
user@my-machine:~/ABC$ cd long-name
user@my-machine:~/ABC/long-name$ cd another-long-name
...
4
votes
3answers
266 views
Construct a command by putting a string into a tty
I managed to do this
echo -n "command" > /dev/tty1
The letters appear, and the cursor moves, but they are "ghosts" - if you hit enter, nothing happens (they are not in stdin).
Edit:
In the ...
4
votes
2answers
2k views
How do I temporary change my keyboard layout on Debian? (no X)
How can I quickly change my keyboard layout between US and German?
setxkbmap does not apply here, as I only have an SSH shell.
Persistent changes via
dpkg-reconfigure keyboard-configuration
...
4
votes
3answers
783 views
How to clear terminal after logging out?
Currently on my laptop when I log out I can still see traces of my last activities (in tty). How can I tell it (Gentoo) to clear the screen before logging out?
4
votes
1answer
608 views
How to get fewer ttys with Systemd?
In the old days I just modified /etc/inittab. Now, with systemd, it seems to start tty[1-6] automatically, how should I disable tty[4-6]?
Looks like there's only one systemd service file, and it use ...
4
votes
2answers
421 views
How to get user-level access to modifier keypresses in console app?
I need to get access to modifier-key state for a console app I'm writing (a personalized editor).
Are there any packages/libs/whatever that provide this access?
I cobbled the following from ...
4
votes
1answer
247 views
Pivot in text mode (no X) (Pivot = rotated 90 degrees)
How to get rotated video in text mode (no X), even during booting sequence ?
OS: Linux
Graphics card: mostly ATI, but curious about NVida and Intel solutions.
4
votes
2answers
572 views
How to install light-weight vim and to be able to efficiently load files into one instance vim?
On my laptop with Ubuntu I'm able to have just one instance of vim, launched with
vim --servername VIM
After this I'm able to open files from console with
vim --remote-silent filename
I use ...
4
votes
2answers
872 views
Remapping caps-lock to escape, and menu to compose, on the linux console
When running X I use a .xmodmaprc to remap certain keys thusly:
! Make it so that both Caps Lock and Escape do Escape
clear Lock
keysym Caps_Lock = Escape
! Remap the menu key as Compose
keysym Menu ...
4
votes
1answer
48 views
Locking console input without screen blanking
I'm looking for a method to lock/disable keyboard input into a text console (tty, no xorg) without blanking the screen. I would like to be able to monitor the on-screen progress of a long-running ...
4
votes
1answer
435 views
How to change cursor shape, color, and blinkrate of Linux Console?
I know I can change some fundamental settings of the Linux console, things like fonts, for instance, with dpkg-reconfigure console-setup.
But I'd like to change things like blinkrate, color, and ...
4
votes
1answer
289 views
Disabling or changing console switching keys
For some reasons on my Ubuntu 11.04 Natty running Linux 2.6.38-13, with an Italian layout for the keyboard, the keystrokes
AltFx switch between virtual consoles (instead of the normal CtrlAltFx ...
4
votes
1answer
259 views
Is there any way to have console (rogue) mode programs take over only part of the terminal screen?
I like the command line because it preserves the context of what I'm doing. But if I use a "rogue" mode program like vi or less, the whole screen gets taken over.
Is a middle way possible, where the ...
4
votes
1answer
781 views
How do I configure setfont and loadkeys properly?
I'm installing LFS and I'm struggling with this section. My locale is sv_SE.UTF-8 and I have a Swedish keyboard. So I suppose I should enable unicode and that the keymap is sv-latin1:
cat > ...
3
votes
2answers
296 views
How can one switch to ttyX in virtualbox?
I run VirtualBox in Linux , running CentOS in it , and I can't switch to ttyX in the CentOS since I'll go to the ttyX in my Linux.
Any solutions ?
3
votes
1answer
631 views
why there are six getty processes running on my desktop?
My desktop system is:
$ uname -a
Linux xmachine 3.0.0-13-generic #22-Ubuntu SMP Wed Nov 2 13:25:36 UTC 2011 i686 i686 i386 GNU/Linux
By running ps a | grep getty, I get this output:
900 tty4 ...
3
votes
3answers
305 views
clear command in Konsole
I know about the Linux clear command, but it just moves the previous output from the visible part of terminal window (KDE Konsole). I can still scroll up and see all previous text. Is there similar ...
3
votes
2answers
125 views
How to safely shutdown computer during boot sequence?
Due to a bug my computer has stopped in the middle of the boot sequence, just waiting. If I type anything, it prints stuff like ^[[B. I do not want to damage the files on the computer by pressing the ...
3
votes
2answers
303 views
Print console colors
Wrote a bash function to display the console colors.
But, it seems some of the colors are not possible to show that way! (?)
Also, note the strange "bright black"!
(Note: The below screendump is of ...
