Show your aliases!

Nothing too fancy

alias cls="clear"
alias nz="nano ~/.zshrc"
alias sz="source ~/.zshrc" 
alias update="yay -Syu --noconfirm && flatpak update"
alias timesh="sudo timeshift --create --tags D"
alias bk="backup.sh"
alias rescue="TTY_rescue.sh"
alias upck="aunpack -D"
alias pck="apack"
alias ucalibre="sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin"
alias cheat="cat ~/.alias_cheatsheet"
alias sy="~/bin/Syswatch/syswatch"
alias rplasma="systemctl --user restart plasma-plasmashell"

Not an Alias however its a useful function to help find an alias.


function find_alias() {
	# find all alias of program
	# print value 1 for the alias=command
	# print value 2 shows the command 
    alias | grep "$1" | awk -F= '{print $1, $2}'
}

What about simply

$ alias hash
alias rehash='hash -r'

or

$ alias | grep eha
alias rehash='hash -r'

This is really risky to use. --noconfirm bricks your system sooner or later.

Since I’m on Plasma, stopped using it. I update my system using the apdatifier widget.

me too.

# pacman and yay
alias up='sudo pacman -Syyu'                # Refresh pkglist & update standard pkgs
alias upp='sudo pacman -Syu'                  # update only standard pkgs
alias upy='yay -Sua --noconfirm'             # update only AUR pkgs (yay)
alias upa='yay -Syu --noconfirm'             # update standard pkgs and AUR pkgs (yay)
alias unlock='sudo rm /var/lib/pacman/db.lck'    # remove pacman lock
alias orphan='sudo pacman -Rns $(pacman -Qtdq)' # remove orphaned packages (DANGEROUS!)

# calibre install/update
alias cup='wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin install_dir=~/calibre-bin isolated=y'

# shutdown or reboot
alias shut='sudo shutdown now'
alias boot='sudo reboot'

# fastfetch
alias ff='fastfetch'

# btop
alias ht='htop'

Thanks for the tip!, added that widget on my test computer and it looks nice.

If you want to skip the “sudo”:

$ ls -al /usr/bin/reboot 
lrwxrwxrwx 1 root root 9 Apr 22 13:17 /usr/bin/reboot -> systemctl

$ ls -al /usr/bin/poweroff 
lrwxrwxrwx 1 root root 9 Apr 22 13:17 /usr/bin/poweroff -> systemctl

#lookup app/file dependencies-thank you www.adamsdesk.com
alias pkgdep=“pacman -Qq | fzf --preview ‘pactree -lur {} | sort’ --layout reverse --bind ‘enter:execute(pactree -lu {} | sort | less)’”

#updates
alias new=‘sudo pacman -Syu’

#home
alias hm=‘cd ~/’

#etc
alias etc=‘cd /etc’

#usr
alias usr=‘cd /usr/share’

fastfetch --logo arch

I only added these recently-within the past 3 weeks or so

~/.config/fish/config.fish

if status is-interactive
    # Commands to run in interactive sessions can go here
    function update
        command sudo pacman -Syu && flatpak update
        # command yay -Syu && flatpak update
    end
end

alias u='yay -Pw && yay -Syyu && flatpak update && flatpak uninstall --unused'
alias c='clear && fastfetch'
alias r='reboot'
alias e='exit'

some I recently added to my .bashrc file

#<----[ Security Checks
alias ckaur='traur scan'
alias ckpkgs='archcanary --refresh -full --log-file=/home/thefrog/bin/logs/archcanary-user-`date +'%m-%d-%Y'`' #<----[ check packages without root 
alias ckpkgs-full='sudo /home/thefrog/bin/archcanary --refresh --full --log-file=/home/thefrog/bin/logs/archcanary-root-`date +'%m-%d-%Y'`'  #<----[ check packages with root permissions (needed for DKMS scan)

Don’t we have to include git pull before the scan to get the latest code?

you should yes however instead of typing the whole thing you can alias it or you can put the whole thing including the git part in a function.

function chkpkgs()
{
cd /path/to/archcanary
git pull
archcanary --refresh -full`
}

however the app wont have updates every time you need it. The updates are plentiful now as we help narrow down issues. but once the program is “complete” the only thing really needing updating is the list in which everything is checked against.

Current aliases in my fish.config…

if status is-interactive
    # Commands to run in interactive sessions can go here
fastfetch
set fish_greeting
# Update, Arch News, Refresh Repos, Update Flatpak, Remove Unused Flatpak Packages
alias u='yay -Pw && yay -Syu && flatpak update && flatpak uninstall --unused'
# List Flatpak Applications
alias fl='flatpak list --columns name,application'
# Clear Terminal and Show Fastfetch
alias c='clear && fastfetch'
# Reboot System
alias r='reboot'
# Exit Terminal
alias e='exit'
# Completely Remove a Package and Unused Dependencies (Orphans)
alias re='yay -Rns'
# Show Local Weather (Highland, Indiana - U.S.A.)
alias w='curl wttr.in/HighlandIndiana | head -n -1'
end

Nice, thanks for that weather :vulcan_salute:

You can remove the HighlandIndiana and just put a . there for local weather

Listen to @thefrog :vulcan_salute: A . is enough

I did that initially. It shows the weather for Darien, Illinois…

╭─ ~ ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 08:52:04 AM 
╰─❯ curl wttr.in/. | head -n -1
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
100   8859 Weather report: Darien, Illinois, US                             0

      \   /     Sunny
       .-.      +69(71) °F
    ― (   ) ―   ↑ 6 mph
       `-’      6 mi
      /   \     0.0 in
                                                       ┌─────────────┐
┌──────────────────────────────┬───────────────────────┤  Tue 04 Aug ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│    \  /       Partly Cloudy  │     \   /     Sunny          │    \  /       Partly Cloudy  │     \   /     Clear          │
│  _ /"".-.     +73(77) °F     │      .-.      +82(87) °F     │  _ /"".-.     +82(84) °F     │      .-.      +75(78) °F     │
│    \_(   ).   ↑ 6-7 mph      │   ― (   ) ―   ↗ 8-9 mph      │    \_(   ).   ↗ 5-7 mph      │   ― (   ) ―   ↑ 4-8 mph      │
│    /(___(__)  6 mi           │      `-’      6 mi           │    /(___(__)  6 mi           │      `-’      6 mi           │
│               0.0 in | 11%   │     /   \     0.0 in | 5%    │               0.0 in | 5%    │     /   \     0.0 in | 7%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐
┌──────────────────────────────┬───────────────────────┤  Wed 05 Aug ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
100   8859   0   8859   0      0  18233      0                              0              0
n ne…│    \  /       Partly Cloudy  │  _`/"".-.     Patchy rain ne…│  _`/"".-.     Patchy rain ne…│
│   ,\_(   ).   69 °F          │  _ /"".-.     +78(82) °F     │   ,\_(   ).   +82(86) °F     │   ,\_(   ).   +75(78) °F     │
│    /(___(__)  ↑ 2-3 mph      │    \_(   ).   ↖ 6-8 mph      │    /(___(__)  ↑ 8-11 mph     │    /(___(__)  ↑ 6-12 mph     │
│      ‘ ‘ ‘ ‘  5 mi           │    /(___(__)  6 mi           │      ‘ ‘ ‘ ‘  6 mi           │      ‘ ‘ ‘ ‘  5 mi           │
│     ‘ ‘ ‘ ‘   0.1 in | 69%   │               0.0 in | 8%    │     ‘ ‘ ‘ ‘   0.0 in | 14%   │     ‘ ‘ ‘ ‘   0.0 in | 66%   │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐
┌──────────────────────────────┬───────────────────────┤  Thu 06 Aug ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│  _`/"".-.     Patchy rain ne…│  _`/"".-.     Light rain sho…│  _`/"".-.     Light rain sho…│     \   /     Clear          │
│   ,\_(   ).   69 °F          │   ,\_(   ).   +73(77) °F     │   ,\_(   ).   +73(77) °F     │      .-.      69 °F          │
│    /(___(__)  ↓ 2-3 mph      │    /(___(__)  ← 5-6 mph      │    /(___(__)  ↙ 6-8 mph      │   ― (   ) ―   ← 3-5 mph      │
│      ‘ ‘ ‘ ‘  6 mi           │      ‘ ‘ ‘ ‘  6 mi           │      ‘ ‘ ‘ ‘  6 mi           │      `-’      6 mi           │
│     ‘ ‘ ‘ ‘   0.0 in | 30%   │     ‘ ‘ ‘ ‘   0.0 in | 36%   │     ‘ ‘ ‘ ‘   0.0 in | 32%   │     /   \     0.0 in | 14%   │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
Location: Darien, IL 60561, United States of America [41.7508713,-87.9739593]


╭─ ~ ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 08:52:13 AM 
╰─❯

Adding HighlandIndiana instead of . shows where I actually am…

╭─ ~ ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 08:54:32 AM 
╰─❯ curl wttr.in/HighlandIndiana | head -n -1
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
100   8759   0   8759   0      0  20743      0                              0
Weather report: HighlandIndiana

      \   /     Sunny
       .-.      66 °F
    ― (   ) ―   ↑ 6 mph
       `-’      6 mi
      /   \     0.0 in
                                                       ┌─────────────┐
┌──────────────────────────────┬───────────────────────┤  Tue 04 Aug ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│     \   /     Sunny          │     \   /     Sunny          │     \   /     Sunny          │     \   /     Clear          │
│      .-.      69 °F          │      .-.      +78(82) °F     │      .-.      +80(84) °F     │      .-.      +73(77) °F     │
│   ― (   ) ―   ↑ 6-8 mph      │   ― (   ) ―   ↑ 6-8 mph      │   ― (   ) ―   ↑ 8-11 mph     │   ― (   ) ―   ↑ 6-13 mph     │
│      `-’      6 mi           │      `-’      6 mi           │      `-’      6 mi           │      `-’      6 mi           │
│     /   \     0.0 in | 11%   │     /   \     0.0 in | 7%    │     /   \     0.0 in | 3%    │     /   \     0.0 in | 8%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐
┌──────────────────────────────┬───────────────────────┤  Wed 05 Aug ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│     \   /     Sunny          │  _`/"".-.     Patchy rain ne…│    \  /       Partly Cloudy  │     \   /     Clear          │
│      .-.      +71(77) °F     │   ,\_(   ).   +78(80) °F     │  _ /"".-.     +82(86) °F     │      .-.      +75(78) °F     │
│   ― (   ) ―   ↑ 3-4 mph      │    /(___(__)  ↖ 4-6 mph      │    \_(   ).   ↑ 9-14 mph     │   ― (   ) ―   ↑ 8-16 mph     │
│      `-’      6 mi           │      ‘ ‘ ‘ ‘  5 mi           │    /(___(__)  6 mi           │      `-’      6 mi           │
│     /   \     0.0 in | 9%    │     ‘ ‘ ‘ ‘   0.0 in | 21%   │               0.0 in | 6%    │     /   \     0.0 in | 8%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐
┌──────────────────────────────┬───────────────────────┤  Thu 06 Aug ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│  _`/"".-.     Patchy rain ne…│  _`/"".-.     Light rain sho…│  _`/"".-.     Moderate or he…│  _`/"".-.     Light rain sho…│
│   ,\_(   ).   71 °F          │   ,\_(   ).   +71(77) °F     │   ,\_(   ).   69 °F          │   ,\_(   ).   69 °F          │
│    /(___(__)  ↗ 3-4 mph      │    /(___(__)  ↘ 1 mph        │    /(___(__)  ↙ 3-4 mph      │    /(___(__)  ↘ 1-2 mph      │
│      ‘ ‘ ‘ ‘  6 mi           │      ‘ ‘ ‘ ‘  6 mi           │    ‚‘‚‘‚‘‚‘   4 mi           │      ‘ ‘ ‘ ‘  6 mi           │
│     ‘ ‘ ‘ ‘   0.0 in | 38%   │     ‘ ‘ ‘ ‘   0.0 in | 63%   │    ‚’‚’‚’‚’   0.2 in | 90%   │     ‘ ‘ ‘ ‘   0.0 in | 45%   │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
Location: Highland, Lake County, Indiana, 46322, USA [41.5536529,-87.4520484]


╭─ ~ ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 08:54:50 AM 
╰─❯