A note on scriptability
Earlier, we alluded to preferring automatable tools like useradd
, instead of interactive wizard-based tools like adduser
– even if those automatable tools are a bit more complex or hard to learn. Or perhaps you’re asking, “Why not just use a graphical tool, instead of these hard-to-remember CLI commands?”
One of the things we want to teach you during the course of this book is to generally prefer non-interactive commands.
Because these commands don’t rely on real-time user input when they run, they are scriptable: creating a hundred users is almost as easy as creating one. This really comes in handy when you’re dealing with real-life problems like building Docker images, repeatedly preparing production environments, or writing cloud-init
setup scripts for your cloud instances.
As a developer, this should ring true: automating things makes them more repeatable, safe, and fast. By learning commands that are...