systemd commands, hints and cheatsheet

List all running services # systemctl Start/stop or enable/disable services Activates a service immediately: # systemctl start foo.service Deactivates a service immediately: # systemctl stop foo.service Restarts a service: # systemctl restart foo.service Shows status of a service including whether it is running or not: # systemctl status foo.service Enables a service to be started […]

read more

Timestamping your bash_history

I use this all the time and occasionally find a server that isn’t configured to timestamp the bash_history. It seemed like something I should preserve here for future reference. Adding a timestamp is really simple, just execute the following: echo ‘export HISTTIMEFORMAT=”%d/%m/%y %T “‘ >> ~/.bash_profile ; source ~/.bash_profile That’s it, now the history command […]

read more