0

I try to change respawn tty to some other bin file , before that I configure that on /etc/inittab But now this file doesn’t exist ; how can I do that ? ( my goal is “ call my binary instead of tty ” )

2

/etc/inittab is the configuration file of classic SysVinit. Debian 9 uses systemd instead by default, although I think you still have an option to use another init system if you wish.

With systemd, the getty processes (= those responsible for handling login prompts on TTY devices) are managed by getty@.service which is defined by file /lib/systemd/system/getty@.service. If you want to modify it, you can either use systemctl edit getty@.service to automatically create a partial override file, or copy the file from /lib/systemd/system/ directory to /etc/systemd/system and then modify it; a customized file in /etc/systemd/system will override a standard file with the same name at /lib/systemd/system.

You should not modify any of the files in /lib/systemd: if you do, your changes may be overwritten in the next systemd update. Instead make your changes and additions in /etc/systemd/: that's what it's for.

  • You can also use systemctl edit --full to copy the unit file in its entirety and edit it. – Stephen Kitt May 19 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.