SystemD Equivalent Command for Upstart

This is equivalent command from SystemD for Upstart.

Operation

Upstart Command

Systemd equivalent

Notes

Start service

start $job

systemctl start $unit

Stop service

stop $job

systemctl stop $unit

Restart service

restart $job

systemctl restart $unit

See status of services

initctl list

systemctl status

Check configuration is valid

init-checkconf /tmp/foo.conf

systemd-analyze verify <unit_file>

Show job environment

initctl list-env

systemctl show-environment

Set job environment variable

initctl set-env foo=bar

systemctl set-environment foo=bar

Remove job environment variable

initctl unset-env foo

systemctl unset-environment foo

View job log

cat /var/log/upstart/$job.log

sudo journalctl -u $unit

tail -f job log

tail -f /var/log/upstart/$job.log

sudo journalctl -u $unit -f

Show relationship between services

initctl2dot

systemctl list-dependencies --all

Shows pstree-style output.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: