If I press Ctrl+Alt+F1 to switch to the 1st terminal session, I have to give my username and password to log in. If I press Ctrl+Alt+F2, I have to repeat this process. Same for F3, F4, F5, and F6.

Is there a way that I can log into all of these terminal sessions at once? It's tedious to repeat this process if I want to use multiple terminal sessions.

  • Why not log in once and then use screen or tmux ? Multiple sessions in one console, and you can disconnect and reconnect as needed – ivanivan Jul 30 '18 at 21:56
  • Why not use a graphical desktop? Their terminal emulators usually have more features than the console (more colors, styles, larger scrollback, search functionality and a whole lot more), plus you can use other kinds of apps (e.g. browsers) in the mean time. (If it's a server with no graphical system: it's usually more convenient to manage it remotely over ssh, rather than sitting in front of it.) I consider the console as a worst-case fallback if things go really wrong in the system. What's your use case for having to or wishing to use the text console? – egmont Jul 31 '18 at 7:40

If your virtual consoles are being provided by getty, you can add this do your systemd configuration to automagically log in as a specific user on all getty consoles. Note that this is hilariously insecure.

You'll have to make a new directory, /etc/systemd/system/getty@tty2.service.d (and another for each TTY beyond TTY2 for which you want this configuration change. In that directory, create an override.conf.

In /etc/systemd/system/getty@tty2.service.d/override.conf:

ExecStart=-/usr/bin/agetty --autologin username --noclear %I $TERM

Please note that anyone who wanders up to your console will be logged in as you and able to do what they please.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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