Jeaye |
05-07-2015 07:29 AM |
Quote:
Originally Posted by rtmistler
(Post 5359073)
|
I'll try to make an argument against powering down with sudo (though I also prefer using poweroff as opposed to telinit or shutdown).
A couple of Christmases ago, I went back home to see some family. I left my Arch work/development machine at home, into which I'd SSH every day. I also had the habit of using sudo shutdown -h now and, therefore, it was in my bash history. On Christmas day, due to a storm, we had crazy spotty internet and, when navigating my bash history, I accidentally hit enter when sudo shutdown -h now was to be shown (though it wasn't showing yet). Not having time to cancel it, due to the 'now' and the choppy connection, I spent the rest of the vacation having to put up with my family instead of back in Linux land. ;)
Don't make the same mistake I did: either use HISTIGNORE or, better yet, avoid scary sudo commands when you can; prefer a login shell with separate bash history (and maybe HISTIGNORE on top of that).
|