6

I'm trying to restart services after a yum update on RHEL 7.4. I could restart pretty much everything, but fail to see how to do this for agetty:

# needs-restarting
736 : /sbin/agetty --noclear tty1 linux

Systemctl does not recognize agetty as a service.

As far as I can see agetty is part of the system and has to do with opening the login prompt.

Can I restart it without rebooting the server, and how?

BenMorel
  • 4,447
  • 8
  • 36
  • 46

1 Answers1

12

Traditionally, you restart getty implementations by killing them — whatever spawned them then takes care of restarting them.

With systemd, you can do this “properly” by restarting getty@tty...:

sudo systemctl restart getty@tty1
Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
  • Cannot figure out analogical syntax for restarting this process: "/sbin/agetty --keep-baud 115200 38400 9600 ttyS0 vt220" - any suggestion please? – Boris Dušek Feb 23 '18 at 17:07
  • @Boris it depends how you started it... I would guess `sudo systemctl restart getty@ttyS0`, but if that doesn’t work, I don’t know; you should ask a separate question. – Stephen Kitt Feb 23 '18 at 18:25