40
submitted 2 days ago by thingsiplay@lemmy.ml to c/linux@lemmy.ml

It can't hurt to share some of you current helpers. Either someone else might get inspired by or in some cases you get suggestions how to make it better. Bash, Zsh, Fish or whatever shell script, command or alias (or abbreviation) you have, share here. Always fun to do so! I share mine in the comments, just like everybody else.

you are viewing a single comment's thread
view the rest of the comments
[-] Kajika@lemmy.ml 5 points 23 hours ago* (last edited 23 hours ago)

From most useful to very specific

alias ..="cd .."

# Hunt for space (show folder sizes, sorted)
alias duc="du -hxd1 | sort -h"

# Remove unnecessary archlinux packages (simple but has to be run as long as some remains because it is not recursive)
alias arch-prune="sudo pacman -Qdtq | sudo pacman -Rn -"

# Just because I can tab-complete commands so it is slightly faster/easier to type
alias arch-update="sudo pacman -Syu"
alias arch-clean="sudo pacman -Scc"

# Check for errors in logs for the current boot (nice to check from time to time, trying to clean up invisible bloat)
alias journal-errors="sudo journalctl -b -p err..alert"

# Start/stop CPU boost (huge power/temperature difference, boost is mostly not needed, those kind of commands are always CPU specific sadly)
alias disable-boost="sudo sh -c \"echo 0 >> /sys/devices/system/cpu/cpufreq/boost\""
alias enable-boost="sudo sh -c \"echo 1 >> /sys/devices/system/cpu/cpufreq/boost\""

# Unmount all mounted tmpfs used when I code (hence the /data/work) as I don't like compiling/bundling stuff on my SSD (avoid unnecessary read/write, RAM is better suited)
alias unmount-worktmpfs="df -lt tmpfs --output=target | tail -n +2 | grep --color=never \"/data/work\" | xargs sudo umount"
[-] thingsiplay@lemmy.ml 3 points 17 hours ago

Showing the biggest directories is indeed useful. I took this simple idea and made it complicated: https://github.com/thingsiplay/biggest which also works for files. It's useful to find the biggest directories or files matching a certain glob pattern. And works on stdin too (in example find ~/Music/Songs/Film/ -iname "*Mario*" | biggest)

I'm stealing your journal command. Really need to lookup more instead guessing around.

this post was submitted on 02 Dec 2026
40 points (97.6% liked)

Linux

69006 readers
446 users here now

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

Related Communities

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

founded 7 years ago
MODERATORS