140
submitted 1 year ago* (last edited 1 year ago) by macallik@kbin.social to c/linux@lemmy.ml

From bash to zsh and everywhere in between, show me yours and I'll show you mines. Inspire others or get some feedback.

Simply copy & paste the output of alias in your terminal or add some comments to explain things for others.

Edit: Kbin users, click 'More' on a comment and use the fediverse link to read responses that have funky formatting

you are viewing a single comment's thread
view the rest of the comments
[-] gamma@programming.dev 2 points 1 year ago* (last edited 1 year ago)

(NOTE: A lot of my more interesting "aliases" are actually short functions, but I'm keeping myself to alias.)

Some of mine that I haven't seen yet:

# Simple python calculator
alias pycalc='python3 -ic "
from math import *\nimport cmath as C
try:
    import numpy as np
except:
    pass
i, j = 1j, 1j
"'

# Defaults
alias cp='cp --interactive --reflink=auto'
alias gcc='gcc -fdiagnostics-color=auto'
# Lemmy doesn't handle ampersands in codeblocks correctly
alias rg='rg --max-columns=$((COLUMNS > 60 && ! ZSH_SUBSHELL ? COLUMNS - 30 : 0))'
alias rj='rg --json'
alias rm='rm -s'
alias rscp='rsync -azP --human-readable --info=flist0,progress2,stats1'
alias rust-c='rustc --out-dir build -O'

# Shorter forms
alias g=git
alias v=$VISUAL
alias py=python
alias jfeu='journalctl --user -xfeu'
alias sys='systemctl --user'
alias Jfeu='journalctl -xfeu'
alias Sys=systemctl

# Desktop stuff
alias trash='gio trash'
alias ud=udisksctl
alias y=wl-copy
alias Y='wl-copy -p'
alias p=wl-paste
alias P='wl-paste -p'

# Colorize with acolor/grc
alias GRC='grc -es'
alias LA='acol ls -lFAhb --color'
alias LS='acol ls -lFhb --color'
alias df='GRC df -hT'
alias dig='GRC dig'
alias docker='GRC docker'
alias docker-machine='GRC docker-machine'
alias env='acol env'
alias lsblk='acol lsblk'
alias lsmount='command mount | rg --color=never "^/" | acol -i -o mount'
alias lspci='acol lspci'
alias mount='acol mount'
alias nmap='acol nmap'
alias ping='GRC ping'
alias ps='GRC ps --columns $COLUMNS'
alias traceroute='GRC traceroute'
this post was submitted on 20 Sep 2023
140 points (97.9% liked)

Linux

47310 readers
569 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 5 years ago
MODERATORS