Skip to content

Instantly share code, notes, and snippets.

@ArtiomL
Last active January 1, 2016 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArtiomL/8165852 to your computer and use it in GitHub Desktop.
Save ArtiomL/8165852 to your computer and use it in GitHub Desktop.
.bash_aliases - Bash Shell Aliases
#!/bin/bash
# .bash_aliases - Bash Shell Aliases
# (CC0) No Rights Reserved
# Artiom Lichtenstein
# v1.9.2, 08/01/2015
alias lsl='ls -lFh'
alias lsa='ls -lAFh'
alias bk='cd -'
alias ns='netstat -anvp | grep -v "unix"'
alias i='ifconfig | grep "Link encap\|inet " | sed -re "s/:([0-9]+.[0-9]+.[0-9]+.[0-9]+)/:$(tput setaf 2)$(tput bold)\1$(tput sgr0)/g"'
alias ipf='echo $(($(</proc/sys/net/ipv4/ip_forward)-1)) | sed "s/-//" | tee /proc/sys/net/ipv4/ip_forward'
alias ipt='for i in $(</proc/net/ip_tables_names); do echo "$(tput setaf 2)$(tput bold)${i^^}$(tput sgr0)"; iptables --table $i -L -n -v --line-numbers; echo; done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment