Difference between revisions of "Systemd FAQ"

From ArchWiki
Jump to: navigation, search
(There we go.)
m (Note as tag.)
(7 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 +
{{Lowercase title}}
 
[[Category:Daemons and system services]]
 
[[Category:Daemons and system services]]
 
[[Category:Boot process]]
 
[[Category:Boot process]]
 +
[[es:Systemd FAQ]]
 +
[[it:Systemd FAQ]]
 +
[[ja:Systemd FAQ]]
 
[[zh-CN:Systemd FAQ]]
 
[[zh-CN:Systemd FAQ]]
 
== FAQ ==
 
== FAQ ==
Line 22: Line 26:
 
  # systemctl stop getty@tty5.service getty@tty6.service
 
  # systemctl stop getty@tty5.service getty@tty6.service
  
Users may also change the number of gettys by editing {{ic|/etc/systemd/logind.conf}} and changing the value of {{ic|NAutoVTs}}. By doing it this way, the on-demand spawning will be preserved, whereas the above method will simply have the gettys running from boot.
 
 
systemd does not use the {{ic|/etc/inittab}} file.
 
systemd does not use the {{ic|/etc/inittab}} file.
  
{{Note|As of systemd 30, only one getty will be launched by default. If you switch to another tty, a getty will be launched there (socket-activation style). You can still force additional agetty processes to start using the above methods.}}}}
+
{{Note|As of systemd 30, only one getty will be launched by default. If you switch to another tty, a getty will be launched there (socket-activation style). You can still force additional agetty processes to start using the above methods.}}
 +
 
 +
Users may also change the number of gettys that may be auto-spawned by editing {{ic|/etc/systemd/logind.conf}} and changing the value of {{ic|NAutoVTs}}. By doing it this way, the on-demand spawning will be preserved, whereas the above method will simply have the gettys running from boot.}}
  
 
{{FAQ
 
{{FAQ
Line 75: Line 80:
  
 
{{FAQ
 
{{FAQ
|question=My computer shuts down, but the power stays on.
+
|question=My computer shuts down, but the power stays on
 
|answer=Use:
 
|answer=Use:
  
Line 105: Line 110:
 
  # systemctl enable ''myscript''.service
 
  # systemctl enable ''myscript''.service
  
This example assumes you want your script to start up when the target multi-user is launched.
+
This example assumes you want your script to start up when the target multi-user is launched. Also do {{ic|chmod 755}} to your script to enable execute permissions if you haven't done so already.
 
+
 
+
'''Note:''' In case you want to start a shell script, make sure you have
+
#!/bin/sh
+
 
+
in the first line of the script. Do not write something like
+
 
+
ExecStart=/bin/sh /path/to/script.sh # DOES NOT WORK
+
  
because that won't work.}}
+
{{Note|In case you want to start a shell script, make sure you have {{ic|#!/bin/sh}} in the first line of the script. Do '''not''' write something like {{ic|<nowiki>ExecStart=/bin/sh /path/to/script.sh</nowiki>}} because that will not work.
 +
}}
 +
}}
  
 
{{FAQ
 
{{FAQ
Line 129: Line 128:
 
|answer=This happens when using {{ic|systemctl enable}} and the symlink it tries to create in {{ic|/etc/systemd/system/}} already exists. Typically this happens when switching from one display manager to another one (for instance GDM to KDM, which can be enabled with {{ic|gdm.service}} and {{ic|kdm.service}}, respectively) and the corresponding symlink {{ic|/etc/systemd/system/display-manager.service}} already exists.
 
|answer=This happens when using {{ic|systemctl enable}} and the symlink it tries to create in {{ic|/etc/systemd/system/}} already exists. Typically this happens when switching from one display manager to another one (for instance GDM to KDM, which can be enabled with {{ic|gdm.service}} and {{ic|kdm.service}}, respectively) and the corresponding symlink {{ic|/etc/systemd/system/display-manager.service}} already exists.
  
To solve this problem, use {{ic|systemctl -f enable}} to overwrite an existing symlink.}}
+
To solve this problem, either first disable the relevent display manager before enabling the new one, or use {{ic|systemctl -f enable}} to overwrite an existing symlink.}}

Revision as of 21:12, 2 September 2013

FAQ

For an up-to-date list of known issues, look at the upstream TODO.

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ

Template:FAQ