Difference between revisions of "Automatic login to virtual console"

From ArchWiki
Jump to: navigation, search
(Undo revision 297335 by Jstjohn (talk) - assignment of an empty string to ExecStart removes any previous assignment)
(all information available in getty via https://wiki.archlinux.org/index.php?title=Getty&diff=440522&oldid=440520)
 
(23 intermediate revisions by 18 users not shown)
Line 1: Line 1:
[[Category:Boot process]]
+
#REDIRECT: [[Getty#Automatic_login_to_virtual_console]]
[[Category:Security]]
+
[[es:Automatic login to virtual console]]
+
[[it:Automatic login to virtual console]]
+
[[ja:Automatic login to virtual console]]
+
{{Related articles start}}
+
{{Related|Display Manager}}
+
{{Related|Silent boot}}
+
{{Related|Start X at Login}}
+
{{Related articles end}}
+
 
+
This article describes how to automatically log in to a [[Wikipedia:Virtual console|virtual console]] at the end of the [[boot process]]. This article only covers console log-ins; see [[Start X at Login]] for information about automatic login into [[Xorg]].
+
 
+
== Configuration ==
+
 
+
Configuration relies on systemd [[Systemd#Editing_provided_unit_files|drop-in files]] to override the default parameters passed to ''agetty''.
+
 
+
Configuration differs for virtual versus serial consoles. In most cases, you want to set up automatic login on a virtual console, (whose device name is {{ic|tty''N''}}, where {{ic|''N''}} is a number). The configuration of automatic login for serial consoles will be slightly different. Device names of the serial consoles look like {{ic|ttyS''N''}}, where {{ic|''N''}} is a number.
+
 
+
=== Virtual console ===
+
 
+
Create the following file (and leading directories):
+
 
+
{{hc|/etc/systemd/system/getty@tty1.service.d/autologin.conf|2=
+
[Service]
+
ExecStart=
+
ExecStart=-/usr/bin/agetty --autologin ''username'' --noclear %I 38400 linux
+
}}
+
 
+
{{Tip|The option {{ic|1=Type=idle}} will delay the service startup until all jobs (state change requests to units) are completed. When using {{ic|1=Type=simple}}, the service will be started immediately, but boot-up messages may pollute the login prompt. This option is particularly useful when [[Start X at Login|starting X automatically]]. To use this option, add {{ic|1=Type=simple}} into {{ic|autologin.conf}}.}}
+
 
+
If you want to use a ''tty'' other than ''tty1'', see [[Systemd FAQ#Q:_How_do_I_change_the_number_of_gettys_running_by_default.3F|systemd FAQ]].
+
 
+
=== Serial console ===
+
 
+
Create the following file (and the leading directories):
+
 
+
{{hc|/etc/systemd/system/serial-getty@ttyS0.service.d/autologin.conf|2=
+
[Service]
+
ExecStart=
+
ExecStart=-/usr/bin/agetty --autologin ''username'' -s %I 115200,38400,9600 vt102
+
}}
+
 
+
==See also==
+
 
+
* [[Systemd#Change_default_target_to_boot_into|Change default runlevel/target to boot into]]
+

Latest revision as of 12:48, 17 August 2016