added some additional systemd utility alias and functions

master
David Kebler 2024-08-03 14:49:03 -07:00
parent 9a90125ac5
commit 3be1dc8325
2 changed files with 19 additions and 0 deletions

View File

@ -11,3 +11,6 @@ alias sdle="systemctl list-unit-files | grep enabled"
alias sdpidu="systemctl show --property MainPID --value" alias sdpidu="systemctl show --property MainPID --value"
alias sdmt="sudo systemctl list-units -t mount --all" alias sdmt="sudo systemctl list-units -t mount --all"
alias sded="sudo systemctl edit" alias sded="sudo systemctl edit"
alias sdcat="sudo systemctl cat"
alias sdsh="sudo systemctl show --all"

View File

@ -49,4 +49,20 @@ loginctl disable-linger
function sdstub { function sdstub {
[[ $(loginctl show-user "$USER" --property=Linger | cut -d= -f2) == 'yes' ]] && echo enabled || echo disabled [[ $(loginctl show-user "$USER" --property=Linger | cut -d= -f2) == 'yes' ]] && echo enabled || echo disabled
}
function sdcatg(){
systemctl cat "$1" | grep "$2"
}
function sdshg(){
systemctl show "$1" | grep "$2"
}
function sdcatug(){
systemctl cat --user "$1" | grep "$2"
}
function sdshug(){
systemctl show --user "$1" | grep "$2"
} }