Browse Source

Adding ubuntu.sh

George Jones 2 years ago
parent
commit
9431e42bab
1 changed files with 29 additions and 0 deletions
  1. 29 0
      rc.local/ubuntu.sh

+ 29 - 0
rc.local/ubuntu.sh

@@ -0,0 +1,29 @@
+# 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
+
+}
+