Sujet : Re: Yet Another New systemd Feature
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.os.linux.miscDate : 07. May 2024, 09:19:34
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v1ckm5$34d8u$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Pan/0.155 (Kherson; fc5a80b8)
On Mon, 6 May 2024 22:00:06 -0000 (UTC), Lawrence D'Oliveiro wrote:
Pro tip: one of the commands you can feed to sudo is “/bin/bash”.
And for added points, you know how you open a terminal as an ordinary
user, only to type “sudo /bin/bash” into it? But that means you create a
process running “sudo”, which in turns spawns the process running bash.
Thus, to terminate the session, you have to type CTRL/D twice.
Whereas, if the command you typed was “exec sudo /bin/bash”, then you only
spawn one process, and only need one CTRL/D to terminate.
Of course, if you get your password wrong, you lose the terminal window
and have to open it again ...