(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.

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
3 points

doas apk -iU upgrade

permalink
report
reply
0 points

An Alpine user, cool! What is it like to use it as your primary desktop OS? I have only played around with it on servers or in VMs and containers.

permalink
report
parent
reply
2 points

still in the setup phase and running LabWC rather than a full desktop – but actually rather enjoying it and have been stumbling across a lot of cases finding out that even with a GUI installed, terminal programs do just as good a job if not better than their graphical counterparts (ex. I don’t think I’ll ever be a full vim/emacs convert, but for basic text editing, nano does just as well as mousepad/leafpad/featherpad/xed/gedit)

permalink
report
parent
reply
1 point

You could give helix a try, feature/functionality wise it’s almost vim, but with 0 config needed and all commands easily discoverable which is closer to nano.

As someone who really tried to get into modal editors, both emacs and vim, for years, it was the first one where i was reasonably fast after a short time and it was easy to discover the keybindings.

permalink
report
parent
reply
3 points

I actually just run the update commands individually when I feel like.

su -l 'pacman -Syu'  # All regular packages
pakku -Syu           # All AUR packages (I know this updates regular packages, too.)
flatpak-update       # Update Flatpak packages with a function I wrote

Since I do not trust Flatpak (especially when it comes to driver updates and properly removing unused crap) I once created this monstrosity.

flatpak-update () { 
    LATEST_NVIDIA=$(flatpak list | grep "GL.nvidia" | cut -f2 | cut -d '.' -f5)
    flatpak update
    flatpak remove --unused --delete-data
    flatpak list | grep org.freedesktop.Platform.GL32.nvidia- | cut -f2 | grep -v "$LATEST_NVIDIA" | xargs -o flatpak uninstall
    flatpak repair
    flatpak update
}

The initial problem with Flatpak thinking it would be a good idea to add dozens of Nvidia drivers and re-download and update all of them on every update (causing a few gigabytes of downloaded files on every run of a normal flatpak update even if nothing needed to be updated) is reportedly fixed, but I just got used to my command.

permalink
report
reply
3 points

The initial problem with Flatpak thinking it would be a good idea to add dozens of Nvidia drivers and re-download and update all of them on every update (causing a few gigabytes of downloaded files on every run of a normal flatpak update even if nothing needed to be updated)

100% agree! Up until last year I was also using Nvidia and the Flatpak drivers for Nvidia got out of hand. I was using just a handful of applications in Flatpak, yet I had 6 different versions of the driver, each 350 MB and every of them was downloaded fully and updated every time. And that is besides other updates and other stuff. I would have needed your function so badly back then. :D

permalink
report
parent
reply
2 points

I made a shell script titled “update”, it updates system packages, flatpaks and python packages. Too many lines for an alias for my tastes.

permalink
report
reply
3 points

I don’t use an alias, as the command to update is pretty small to begin with.

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