aboutsummaryrefslogtreecommitdiff
path: root/conf.d/03linux.fish
diff options
context:
space:
mode:
Diffstat (limited to 'conf.d/03linux.fish')
-rw-r--r--conf.d/03linux.fish52
1 files changed, 52 insertions, 0 deletions
diff --git a/conf.d/03linux.fish b/conf.d/03linux.fish
new file mode 100644
index 0000000..9822da4
--- /dev/null
+++ b/conf.d/03linux.fish
@@ -0,0 +1,52 @@
+if status is-interactive; and string match -q -e 'Linux' (uname)
+
+if command -sq dircolors; and test -f ~/.config/dircolors
+ eval (dircolors -c ~/.config/dircolors)
+end
+
+alias ls 'ls --color=auto -F'
+alias la 'ls --color=auto -F -a'
+alias ll 'ls --color=auto -F -l'
+alias lla 'ls --color=auto -F -l -a'
+
+alias grep 'grep --color=auto'
+alias diff 'diff --color=auto'
+
+alias ff 'find . -type f -name'
+alias fd 'find . -type d -name'
+alias fbs 'find . -xtype l'
+
+alias who 'who -H -w -u'
+
+alias free 'free -h'
+alias df 'df -Th'
+alias ps 'ps -ejH'
+alias lsof 'lsfd'
+
+# If we have iproute2
+if command -sq ip
+ alias ip "ip -c"
+ alias sockstat "ss -4 -6 -l -r -p"
+
+ alias_if_not route ip route
+ alias_if_not ifconfig ip link
+ alias_if_not netstat ss -4 -6 -l -r -p
+end
+
+# If we have systemd
+if command -sq systemctl
+ alias pss "systemd-cgls"
+ alias ipconfig "networkctl -a status"
+
+ if not fish_is_root_user
+ alias showdnscache "sudo resolvectl show-cache"
+ alias cleardnscache "sudo resolvectl flush-caches"
+ else
+ alias showdnscache "resolvectl show-cache"
+ alias cleardnscache "resolvectl flush-caches"
+ end
+
+ alias_if_not nslookup systemd-resolve
+end
+
+end