Skip to content

Instantly share code, notes, and snippets.

@oddlyzen
Last active July 6, 2025 21:41
Show Gist options
  • Save oddlyzen/c39d52fe4971e6e876f1b615e65d19d5 to your computer and use it in GitHub Desktop.
Save oddlyzen/c39d52fe4971e6e876f1b615e65d19d5 to your computer and use it in GitHub Desktop.
Awesome aliases for your Linux Mint.
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# alias ss="script/server"
# alias sc="script/console"
alias d="ls -G"
alias ll="d"
alias lsd="ls -lahG"
alias lsa="ls -a"
# alias cdt="cd ~/code/dtime_web"
alias cdp="cd ~/Desktop/Projects"
alias gs="git status"
alias gca="git commit -am"
# alias pgstart="pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start"
# alias mmongo="mongod run --config /usr/local/Cellar/mongodb/1.8.2-x86_64/mongod.conf"
alias mysqlstart="mysql.server start"
alias my-sql="mysql -u root -p"
# alias reloadtm="osascript -e 'tell app \"TextMate\" to reload bundles'"
# ------
# From others' .bash_aliases
# Become system administrator
alias god='sudo -i'
alias root='sudo -i'
# For nano editor
alias nano='nano -w'
# apt-get aliases
alias apt-install='sudo apt-get install'
alias apt-search='apt-cache search'
alias apt-show='apt-cache show'
alias apt-purge='sudo apt-get --purge remove'
alias apt-remove='sudo apt-get remove'
alias apt-up="sudo apt-get update && sudo apt-get upgrade"
alias apt-policy="LANG=C apt-cache policy"
# Other
alias emacs='emacs22-gtk'
alias emacsfs='emacs22-gtk -fs'
alias gohome='cd ~; clear'
alias h='head'
alias ls='ls --color=auto'
alias reload='source $HOME/.bashrc'
alias showalias='cat $HOME/.bash_alias'
alias shr='shred -u '
alias t='tail'
alias temps='acpi -t'
alias 'make_me_a_sandwich'='echo "What? Make it yourself"'
alias 'sudo_make_me_a_sandwich'='echo "ok"'
#find file
alias f='find . |grep '
#search history
alias h='history|grep '
#search processes
alias p='ps aux |grep '
#open any file or folder with default app
alias o='xdg-open '
#python calculator
alias pc='python -i -Qnew -c "from math import *"'
#python calculator (plus numpy and matplotlib)
alias pcn='python -i -Qnew -c "from math import *;from pylab import *"'
# Cool!
alias !='sudo'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
man2pdf() {
if [[ -z $1 ]]; then
echo "USAGE: man2pdf [manpage]"
else
if [[ `find /usr/share/man -name $1\* | wc -l` -gt 0 ]]; then
out=/tmp/$1.pdf
if [[ ! -e $out ]]; then
man -t $1 | ps2pdf - > $out
fi
if [[ -e $out ]]; then
/usr/bin/evince $out
fi
else
echo "ERROR: manpage \"$1\" not found."
fi
fi
}
# man2html() {
# if [[ -z $1 ]]; then
# echo "USAGE: man2html [manpage]"
# else
# if [[ `find /usr/share/man -name $1\* | wc -l` -gt 0 ]]; then
# out=/tmp/$1.html
# if [[ ! -e $out ]]; then
# man -H=google-chrome $1
# fi
# if [[ -e $out ]]; then
# google-chrome $out
# fi
# else
# echo "ERROR: manpage \"$1\" not found."
# fi
# fi
# }
# perform 'ls' after 'cd' if successful.
cdls() {
builtin cd "$*"
RESULT=$?
if [ "$RESULT" -eq 0 ]; then
lsa
fi
}
alias cd='cdls'
@voyeg3r
Copy link

voyeg3r commented Dec 23, 2017

make a new directory and enter it

mkcd () {
mkdir -pv -p "$@" && cd $_
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment