ls and cd
I do love
fuck
.xdg-open FILE
- opens a file with the default GUI app. I use it for example to open PDFs and PNG. I have a one letter alias for that. It can also open a file explorer in the current directoryxdg-open .
. Should work on any compliant desktop environment (gnome/kde).I use “ping” every time I suspect my internet might be going a bit slow.
cd
thenls
thencd
thenls
maybe I’ll throw als -a
I use -A instead, which doesn’t show “.” and “…”
Uhhh…
sudo su
Don’t be like me
sudo -i
Going to shamelessly plug my custom bashrc setup which has a ton of little scripting helpers and a few useful aliases. Remember to clone recursively if you want to try it out. (Still very much a work in progress, but it’s getting to be pretty robust)
Btop is an amazing resource monitor
Have you tried glances?
Never heard of it, looks cool but not as pretty as btop. Also has a ton of information I don’t personally care about so for me it doesn’t seem great.
sl
Choo choo!
A lemming of taste
Not a command but bang expansions. For example
!?
is the args of last command useful for stuff likemkdir foo ; cd !?
https://www.redhat.com/sysadmin/bash-bang-commands learn these. you suck at using your computer if you don’t know them.
Is there something similar in fish shell?
Not a specific command, but I learned recently you can just dump any executable script into ~/bin and run it from the terminal.
I suffer greatly from analysis paralysis, I have a very hard time making decisions especially if there’s many options. So I wrote a script that reads a text file full of tasks and just picks one. It took me like ten minutes to write and now I spend far more time doing stuff instead of doing nothing and feeling badly that I can’t decide what to do.
or add it to path
This is because
$HOME/bin
is in your$PATH
environment variable. You can add more paths that you’d like to execute scripts from, like a personal git repo that contains your scripts.I think the standard is ~/.local/bin, for the people that like standards.
After using too much WINE, I type
pwd
,whoami
sudo pacman -Syu
I just aliased “sudo pacman -Syu && yay -Syu --aur” to “update” cause I got tired of writing it every day.
You can just run
yay
with no arguments and it does exactly what your update script does.Huh, the more you know.
atools
, which includesals
,aunpack
,apack
. so you can stop caring about the kind of archive and just unpack it. it also saves you from shit archives that have multiple files/dirs in their root.perl -e
/perl -lne
/ …units
bc
- a calculator that’s actually goodpass
- the only non-shit password store tool i’ve found so far. no gui, uses gpg and git to do the encrypting and storage/sharingalias lr='ls -lrth'
- so you can easily find the newest file, cos that’s frequently what you wantunip
- my script to look up things in the unicode dbfind -type f -exec xzgrep 're' {} +
- because xzgrep cant do -r
oh yeah, and for the shell readline, alt-b, alt-f, ctrl-w, ctrl-u, ctrl-k, ctrl-a, ctrl-e
Getting cheatsheets via
curl cheat.sh/INSERT_COMMAND_HERE
No install necessary, Also, you can quickly search within the cheatsheets via
~
. For example if you copycurl cheat.sh/ls~find
will show all the examples ofls
that usefind
. If you remove~find
, then it shows all examples ofls
.I have a function in my bash alias for it (also piped into
more
for readability):function cht() { curl cheat.sh/"$1"?style=igor|more }