Can't Use 'start' command in 15.04
The service management system has changed.
Every system management toolset has own utilities. The utilities that you are used to using are the ones that come with upstart, which are trivial shims for initctl start
and initctl stop
. But this is Ubuntu version 15. You aren't using upstart any more.
You're using systemd, and the service control commands are subcommands of systemctl
rather than of initctl
. So services are started with systemctl start
, stopped with systemctl stop
, enabled with systemctl enable
, disabled with systemctl disable
, and queried with systemctl status
.
Services and service configuration have changed.
You've presumably followed instructions like the Serial Console How-To to turn the supplied /etc/init/tty1.conf
into an /etc/init/ttyS0.conf
. This is an upstart configuration file and it will simply be ignored by systemd. None of what you have learned from there applies to systemd, not even the concept of run levels, which is "obsolete" in the systemd world.
The systemd configuration file for a getty
on a real terminal device is /lib/systemd/system/[email protected]
. This is a template unit, parameterized on the name of the serial device file. So the actual service name to use will be [email protected]
. You just enable/disable/start/stop it like any other service.
If you want an actual serial console, rather than just an ordinary serial terminal, then you don't even do that. systemd has a mechanism that automatically instantiates [email protected]
whenever the kernel is told to not have its console on a virtual terminal.
Further reading
- Lennart Poettering (2013-10-07).
systemctl
. systemd manual pages. freedesktop.org. - James Hunt and Clint Byrum (2014). "Utilities". Upstart Cookbook.
- Steve Langasek (2015-04-10). Serial Console How-To. Ubuntu.
- Lennart Poettering (2013-10-07).
systemd-getty-generator
. systemd manual pages. freedesktop.org.
Related videos on Youtube
TomL12953
Updated on September 18, 2022Comments
-
TomL12953 over 1 year
I used to be able to start and stop processes in Terminal with
sudo start
orsudo stop
Example:
sudo start ttyS0
This would start a getty so I could log in from a serial terminal. It doesn't work in Ubuntu 15.04. Is there an alternate way to start and stop processes in 15.04?-
A.B. about 9 yearsWich getty package?
-
-
Zanna over 7 yearsthis seems to be a comment on the other answer...
-
baofeng over 7 yearsTrying to give an alternative if systemctl and systemd are over-killing the case. And unused instructions are removed according to your comments, thanks!
-
baofeng over 7 yearsAnd comments from JdeBP doesn't really give a direct answer to the question. I have tried to start a service
root@server1:~# systemctl start ttyS0
but it fails without giving more clue to continue:Failed to start ttyS0.service: Unit ttyS0.service failed to load: No such file or directory.