Skip to content

Instantly share code, notes, and snippets.

@saya-rbt
Last active November 29, 2020 21:31
Show Gist options
  • Save saya-rbt/6031879e4ddd197cc25482adb5648aaa to your computer and use it in GitHub Desktop.
Save saya-rbt/6031879e4ddd197cc25482adb5648aaa to your computer and use it in GitHub Desktop.
Funny and somewhat useful aliases

Funny and somewhat useful aliases

So I went through my .bashrc file to save them in case I need them later. When reading them again, I thought "Wait, some of these are quite funny", so here you go, have my funny aliases.

General aliases

# ls aliases
alias l="ls"
alias ll="ls -al"
alias lh="ls -alh"

# ps aliases
alias p="ps"
alias pf="ps -ef"
alias psp="pstree -p" #requires pstree (obviously)

# other
alias sdn="shutdown now"
alias rbt="reboot"
alias cl="clear"
alias e="exit"
alias nth="nethogs"

Shortcuts

# edit aliases
alias edal="sudo nano ~/.bashrc"

# postgresql
alias pglog="sudo -u postgres -i"
alias pgst="pg_ctl -D /var/lib/postgres/data -l logfile start"

# gcc
alias gw="gcc -Wall -Wextra"
alias gwo="gw -o"
alias gwg="gw -g"
alias gwgo="gwg -o"
alias gwglmo="gwg -lm -o"

# python start venv/jupyter notebook
alias jpnb="jupyter notebook"
alias sve="source env/bin/activate"
alias sven="sve; jpnb &"

# sudo
# the use for them is usually to type "please!!" and bash will redo the command with sudo
# I am aware it takes more characters to type, and I also do not care, it's funny
alias sorryiwontforgetsudoagain="sudo "
alias please="sudo "

# Nvidia PRIME
# To run stuff on GPU
alias prn="prime-run "

# Evince (common pdf reader that I keep forgetting the name of)
alias rpdf="evince"

Pacman/yay aliases

# pacman
alias pacsyu="sudo pacman -Syu"
alias pacs="sudo pacman -S"
alias pacr="sudo pacman -Rs"
alias pac="sudo pacman"

# yay
alias ysyu="yay -Syu"
# those two are my favourite ones
alias yoink="yay -S"
alias yeet="yay -Rs"

ROS aliases

# Catkin aliases
alias cknm="catkin_make"
alias cknmpy3="cknm -DPYTHON_EXECUTABLE=/usr/bin/python3"
alias cknpc="catkin_create_pkg"

# ROS aliases
# run this when in your workspace
# rosiws (ROS initialize workspace) is enough to just set everything up
alias rossrc="source devel/setup.sh"
alias rospath='echo "$ROS_PACKAGE_PATH"'
alias rosiws="rossrc && rospath"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment