this post was submitted on 20 Sep 2023
120 points (97.6% liked)

Linux

48031 readers
1225 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
 

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
[–] backhdlp@lemmy.blahaj.zone 3 points 1 year ago (2 children)

Don't really organize my aliases after making them, so this might be a mess.

##################
#   ~/.aliases   #
##################

# Colours
alias color-GREEN='tput setaf 2'
alias color-RED='tput setaf 1'
alias color-CYAN='tput setaf 78'
alias color-PURPLE='tput setaf 128'
#alias color-BLUE='tput setaf 4'
alias color-RESET='tput sgr0'
alias color-LIGHT_PURPLE='tput setaf 5'
alias color-LIGHT_BLUE='tput setaf 12'
alias color-TEXT='tput setaf 15'
alias color-HIDDEN='tput setaf 236'

# don't set a shutdown timer
alias shutdown='shutdown now'

# grep
alias grep='grep --color=auto'
alias pgrep='pgrep -l'

# package manager
alias pacman='sudo pacman --color=auto'
alias paru='paru --color=auto'

# ls
alias ls='eza -aMF --hyperlink --group-directories-first --icons --color=auto'
alias ll='eza -alhMF@ --hyperlink --group-directories-first --icons --color=auto --color-scale'
alias lg='eza -alhMF@ --hyperlink --group-directories-first --icons --git --git-repos --git-ignore --color=auto --color-scale'

# confirm before overwriting
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'

# update grub.cfg
alias grub-update='sudo grub-mkconfig -o /boot/grub/grub.cfg'

# update function
u() {
	# update distro specific packages
	if command -v pacman &> /dev/null
	then
		# update pacman packages
		printf "\n[Update] Updating Standard Packages:\n\n"
		sudo pacman -Syu --color=auto
		# update aur packages
		if command -v paru &> /dev/null
		then
			printf "\n[Uodate] Updating AUR Packages:\n\n"
			paru -Sau --color=auto
		fi
	elif command -v apt &> /dev/null
 	then
		# update apt packages
		printf "\n[Update] Updating Standard Packages:\n\n"
		sudo apt-get update
		sudo apt-get upgrade
	fi
	# update flatpaks
	if command -v flatpak &> /dev/null
	then
		printf "\n[Update] Updating flatpaks:\n\n"
		flatpak update
	fi
	# todo:
	# - update grub
	# - source shell config
	printf "\n[Update] Done\n"
}

# view metadata
alias meta='exiftool'

# makepkg dependencies and install
alias makepkg='makepkg -si'

# git
alias gc='git clone'

# quick probe
alias probe='sudo -E hw-probe -all -upload -show -verbose'

# shorten pacman commands
alias pm='pacman'
alias pms='pm -Syu'
alias pmr='pm -Rns'
alias pmq='pm -Q'
alias pmu='pm -U'
alias pmd='sudo downgrade'
alias pmc='sudo paccache'

# rm pacman lock
alias rmpml='sudo rm /var/lib/pacman/db.lck'

# quick access to configs
alias brc='$EDITOR ~/.bashrc'
alias bash='exec bash'
alias zrc='$EDITOR ~/.zshrc'
alias zsh='exec zsh'
alias alia='$EDITOR ~/.aliases'
alias expo='$EDITOR ~/.exports'
alias swayc='$EDITOR ~/.config/sway/config'
#alias alac-conf='$EDITOR ~/.config/alacritty/alacritty.yml'
alias starc='$EDITOR ~/.config/starship.toml'
alias kittc='$EDITOR ~/.config/kitty/kitty.conf'
alias nvimc='$EDITOR ~/.config/nvim/init.vim'

# alias fetch scripts with hyfetch during pride month
[[ $(date +'%b') == "Jun" ]] && alias neofetch='hyfetch -b neofetch'
[[ $(date +'%b') == "Jun" ]] && alias fastfetch='hyfetch -b fastfetch'

# use fastfetch backend for hyfetch
alias hyfetch='hyfetch -b fastfetch'

# add sudo
alias docker='sudo docker'
alias systemctl='sudo systemctl'

# systemd
alias sc='systemctl'
alias sce='sc enable'
alias scd='sc disable'
alias scs='sc start'
alias scu='sc stop' # the u comes from unset
alias scr='sc restart'

# yt-dlp
alias ytm='yt-dlp -x -o "~/Music/%(title)s.%(ext)s" --add-metadata --embed-thumbnail --audio-quality 0'
alias ytv='yt-dlp -o "~/Videos/%(title)s.%(ext)s" --add-metadata --embed-thumbnail --embed-subs --embed-chapters'

# edit quicker
alias e='$EDITOR'
alias se='sudoedit'

# ryujinx (created by pinejinx)
alias ryu="AMD_DEBUG=w32ge,w32cs,nohyperz,nofmask glsl_zero_init=true radeonsi_clamp_div_by_zero=true force_integer_tex_nearest=true mesa_glthread=false vblank_mode=0 RADV_PERFTEST=bolist gamemoderun DOTNET_EnableAlternateStackCheck=1 GDK_BACKEND=x11 /home/luna/.local/share/Ryujinx/Ryujinx"

# Vencord
alias inven="sudo VencordInstallerCli-linux -install && sudo VencordInstallerCli-linux -install-openasar"
alias unven="sudo VencordInstallerCli-linux -uninstall && sudo VencordInstallerCli-linux -uninstall-openasar"

# bun > npm
alias npm='bun'

# replace cat
alias cat='bat'

# sudo
alias s='sudo'
[–] reddit_sux@iusearchlinux.fyi 1 points 1 year ago

I agree pms is a pain especially if it is delayed for more than a month.

[–] macallik@kbin.social 1 points 1 year ago

Gonna steal/repurpose the shutdown one, use the "sudo docker" = "docker" one and also the grub one. Good lord @ all the configs you edit lol.