https://chuck.is/alias/ Chuck Carroll Reading Writing Now Some Useful Bash Aliases Published: 2022-08-06 I spend a good chunk of time in a terminal and sometimes need to run a long command to get specific tasks done. I've known about aliases for a while but only recently began using them. Below are some aliases I've set up permanently in my .bashrc config. Aliases must be set up in the format of 'alias [name]='[command]' and saved into .bashrc in the home folder. For example, alias music='cmus' will launch cmus whenever I enter 'music' into my terminal. Here is a list of aliases I've set up that range from fun to boring, but are all useful nonetheless. Entering the alias in a terminal will automatically run the corresponding command. * Alias: weather Command: curl wttr.in/austin Purpose: spits out what the weather is in Austin TX (or whichever city you specify). * Alias: define Command: sdcv Purpose: I wrote a post about this one. Typing 'define' followed by a word will output that word's definition. * Alias: flac2ogg Command: find . -name "*flac" -exec oggenc -q 9 {} \; Purpose: When I buy music off of Bandcamp, I download the FLAC version and then convert it to OGG. BC does offer OGG, but it's in a lower quality than I prefer * Alias: wifi Command: nmcli dev wifi show-password Purpose: Typing this outputs the wifi password of the network I'm currently connected to, as well as provides a useful QR code. * Alias: unmountBackup Command: umount /run/media/chuck/Backup Purpose: I often mount and unmount my external drive. Typing "unm" then tabbing will autocomplete 'unmountBackup', so I don't have to type out the entire path every time. * Alias: ddg Command: w3m lite.duckduckgo.com Purpose: This brings up the light version of Duck Duck Go in w3m so I can do web searches right from a terminal window. * Alias: rm Command: rm -r Purpose: Because when I type "rm" I don't want to always have to specify "-r" for a directory. * Alias: cp Command: cp -r Purpose: Same as above. When I say "copy this" I always want it to copy whatever I'm specifying, even if it's a directory. * Alias: rss Command: newsboat Purpose: A shorter way to start up newsboat (an even quicker way is setting a keyboard shortcut to Super+N) * Alias: vpn Command: protonvpn-cli Purpose: Just a shorter way to start up ProtonVPN's CLI tool so I can type things like 'vpn -r' instead of 'protonvpn -r' I also have another alias which will SSH into my shared hosting, shortening ~70 characters down to just sshchuck. Thanks for reading. Feel free to send comments, questions, or recommendations to hey@chuck.is. --------------------------------------------------------------------- RSS Feed | Email CC BY-NC-SA 4.0 | Chuck Carroll (c) 2023