Ricardo J. Barberis

Authored Comments

Nice article, thanks for sharing!

One suggestion though: instead of editing /etc/sudoers (either directly, with visudo, or with a config management system) you can put sinppets in /etc/sudoers.d/

Make sure files in /etc/sudoers.d/ have permissions 0440 and owner root:root, and run 'visudo --check' afterwards to make sure all the files have the right syntax.

Cheers!

The problem with bash's history shorcuts for me is... that I never had the need to learn them.

Provided that your shell is readline-enabled, I find it much easier to use the arrow keys and modifiers to navigate through history than type !:1 (or having to remeber what it means).

Examples:

Ctrl+R for a Reverse search
Ctrl+A to move to the begnining of the line (Home key also)
Ctrl+E to move to the End of the line (End key also)
Ctrl+K to Kill (delete) text from the cursor to the end of the line
Ctrl+U to kill text from the cursor to the beginning of the line
Alt+F to move Forward one word (Ctrl+Right arrow also)
Alt+B to move Backward one word (Ctrl+Left arrow also)
etc.

YMMV of course.