Linux Administration Cookbook
上QQ阅读APP看书,第一时间看更新

Determining running services

Whenever you get to a box, especially one you're unsure of (that's been tucked in the back of a cupboard somewhere blinking to itself), it's a good idea to find out what software is running on it.

On modern systems (2013-ish plus), this is accomplished with the systemctl command.

systemctl is the main control mechanism for any systemd system—literally "system control". Think of it as the human frontend to your initialization software (the first software to run on your box, which manages all others), allowing you to modify and investigate the running state of your computer.

Not only that, in the Unix/Linux world everything is a file; your network connections are a file, your programs are a file, your devices are a file, and because of this you can control everything, just by modifying files.

But that gets tedious fast.

systemctl saves you the headache of manually shuffling files around your system by wrapping functionality in simple commands and printing the results in a human-readable way.