DEV Community


Posted on

Login without username in TTY

Login WITHOUT Username from TTY

Hi, in this blog post, i will showcase how you can configure your getty systemd service so that, you are able to login without entering your username. This is really helpful if you are the only one that uses the system. If multiple people use your system, you can still use this method by assiging each "person" a seperate tty to login to the computer.

This method has been tested on Arch Linux. (systemd)

Default login prompt in tty

Enabling auto login with username in all TTY

First, you need to edit the getty@tty1.service file.

sudo vim /etc/systemd/system/ (if you do not know how to use vim, use nano or any other editor)

Check for the line which starts with ExecStart= and replace it with ExecStart=-/sbin/agetty -n -o <username> %I
Make sure to change <username> to which ever username you want as the default.

Changing configuration file

Enabling auto login for a specific TTY

Instead of editing getty@tty1.service, you edit the file for the tty you want. ie, getty2.service for example


Now you should be able to see a prompt like this when you reboot

New prompt with only password

Source: getty#Prompt_only_the_password_for_a_default_user_in_virtual_console_login
For more info on how tty's work



Website | GitHub | Youtube | Patroen | Discord

Top comments (0)