(Edit: I always forget that Beehaw will convert every ampersand character in code segments to &. Have this in mind when reading the code below. Do you have these problems too with your instance?)

If you update your system from terminal, do you have a shortcut that bundles bunch of commands? I’m on EndevourOS/Arch using Flatpak. Rustup is installed and managed by itself. The empty command is a function to display and delete files in the trash using the program trash-cli. In my .bashrc:

alias update='eos-update --yay \
    ; flatpak uninstall --unused \
    ; flatpak update \
    ; rustup update \
    ; empty'

empty() {
    trash-empty -f --dry-run |
        awk '{print $3}' |
        grep -vF '/info/'
    trash-empty -f
}

I just need to type update. Also there are following two aliases, which are used very rarely, at least months apart and are not part of the main update routine:

alias mirrors='sudo reflector \
        --protocol https \
        --verbose \
        --latest 25 \
        --sort rate \
        --save /etc/pacman.d/mirrorlist \
    && eos-rankmirrors --verbose \
    && yay -Syyu'

alias clean='paccache -rk3 \
    && paccache -ruk1 \
    && journalctl --vacuum-time=4weeks \
    && balooctl6 disable \
    && balooctl6 purge \
    && balooctl6 enable \
    && trash-empty -f'

This question is probably asked a million times, but the replies are always fun and sometimes reveals improvements from others to adapt.

2 points
*

My hot tip: initial capital so that your aliases are just a capital letter + tab away. Cache cleanup, update and Bleachbit:

alias Päivi=‘sudo pacman -Suy --noconfirm’

alias Siivous=‘sudo pacman -Sc --noconfirm;sudo pacman -Rns –noconfirm $(sudo pacman -Qtdq)’

alias SuurSiivous=‘sudo bleachbit -c system.trash system.ro tated_logs system.localizations java.cache journald.clean b ash.history’

permalink
report
reply
1 point

I was using capital letters in the past, but they look so alien and are not fluid to type as small letters only. After some time I wasn’t sure which commands where capital and which were small letters, so left that concept behind me.

But as a Vim user, I think of using single capital letters to open specific documents and files directly in Vim; emulating the global mark functionality of Vim. At the moment I have a convention of small letter+“rc” that will open configuration file in Vim, like this:

alias brc='nvim ~/.bashrc && source ~/.bashrc'
alias mrc='nvim ~/.config/MangoHud/MangoHud.conf'
alias nrc='nvim ~/.config/nvim'
...

But I might replace them with single letters brc as B in example.

permalink
report
parent
reply
1 point
alias update='sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y'
alias update-and-reboot='sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y && sudo reboot'
alias update-and-poweroff='sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y && sudo poweroff'
permalink
report
reply
2 points
*
#!/usr/bin/env dash

set -e

cd $HOME/nixcfg

# flake inputs to update
for input in nixpkgs nixos-hardware home-manager hosts; do
	nix --extra-experimental-features flakes --no-warn-dirty flake update $input
done

# rebuild NixOS
nixos-rebuild --use-remote-sudo switch --keep-going --fallback --flake $HOME/nixcfg#$(hostname)

# check for firmware upgrades
fwupdmgr get-updates

# print hard drive status info
sudo smartctl -H /dev/nvme0n1
sudo zpool status -v -x
permalink
report
reply
2 points

I am a former openSUSE user, so my alias is: dup. It just refers to ujust-update, as Aurora is my current daily-driver.

permalink
report
reply
5 points

Honestly, no. I just use direct apt commands on my Debian installs for native stuff, assuming I even use the shell for that; sometimes, if it’s not a complex update that’s going to hold back 1.0*106 packages, I just use Synaptic or Package Updater, frankly, as one of those is what I have my XFCE Package Update Indicator set to use on any machine I use frequently and it’s convenient sometimes.

As for Flatpaks, I just run the flatpak update command whenever I feel bored. I wish Warehouse GUI supported updating, just because I find it really weird that’s excluded from an otherwise pretty slick application that gets rid of me having to muck through the Flathub.

I don’t write Rust code at the moment, and as for Python, I’m either using the Debian version of Python packages or scattered venvs that follow a de facto standard for Python developers: “What’s an update?”

permalink
report
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8.3K

    Monthly active users

  • 3.4K

    Posts

  • 40K

    Comments