1234567891011121314151617181920212223242526272829 |
- # Ubuntu related aliases
- # systemd
- function sys () {
- # systemd aliases
- # https://linuxhandbook.com/systemd-list-services/
- if [ $# -eq 0 ]; then
- echo "$FUNCNAME: Usage: $FUNCNAME {list|running}" 1>&2
- return
- fi
- if [ "$1" == "list" ]; then
- # list all systemd services
- systemctl --type=service
- elif [ "$1" == "running" ]; then
- # list running systemd running
- systemctl --type=service
- else
- echo "$FUNCNAME: Unknow command $1" 1>&2
- echo "$FUNCNAME: Usage: $FUNCNAME {list|running}" 1>&2
- fi
- }
|