Skip to content

Instantly share code, notes, and snippets.

@alptugan
Last active February 8, 2018 08:45
Show Gist options
  • Save alptugan/480c7ab67c956179394ce71e53a6df6e to your computer and use it in GitHub Desktop.
Save alptugan/480c7ab67c956179394ce71e53a6df6e to your computer and use it in GitHub Desktop.
Set of bash aliases
# open bash_profile
sudo nano ~/.bash_profile
# add the following line
. ~/.bash_aliases
Kntrl+o
Kntrl+x
source ~/.bash_profile
## tinwhistle box ~/.bash_aliases file for user
# User specific aliases and functions
# Streaming Radio Stations
alias kdox='mplayer http://wms2.mainstreamnetwork.com/kdox-am &'
alias wabc='mplayer http://69.28.128.148:80/stream/citadelcc_WABC-AM &'
# Clear the terminal
alias cls='clear'
# Start X server
alias x='startx'
# Change bash prompt. See the article
# http://www-106.ibm.com/developerwork.../l-tip-prompt/
export PS1='\d \@ \[\e[32;1m\]\u\[\e[34;1m\]@\[\e[36;1m\]\H \[\e[34;1m\]\w\[\e[32;1m\] $ \[\e[0m\]'
# Monitor logs
# alias syslog='sudo tail -100f /var/log/syslog'
# alias messages='sudo tail -100f /var/log/messages'
# Keep 1000 lines in .bash_history (default is 500)
export HISTSIZE=1000
export HISTFILESIZE=1000
#Stop bash from caching duplicate lines.
HISTCONTROL=ignoredups
#Enter openFrameworks folder just by typing "oF"
alias oF='cd /home/alptugan/of_v20170714_linuxarmv7l_nightly/'
#Run project generator by typing projectgenerator
alias projectgenerator='oF && ./apps/projectGenerator/commandLine/bin/projectGe$
# Read temperature of rPi
alias temp='/opt/vc/bin/vcgencmd measure_temp'
# Read screen properties
alias screen='/opt/vc/bin/tvservice -s'
# Disk free in human terms
alias df='df -h'
# List paths
alias path='echo -e ${PATH//:/\\n}'
# Upgrade/update system
# alias upgrade='sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove'
# Encode wav files to flac and delete the wav file
alias zipwavd='flac -V --best --delete-input-file *.wav'
# Encode wav files to flac and keep the wav file
alias zipwav='flac -V --best *.wav'
# Decode flac files to wav format
alias uzipwav='flac -d -V *.flac'
# Encode wav to ogg
# alias oggem=oggenc -n *.wav -o *.ogg
# Allow local users to use my X session
# xhost +local:
# I can't remember the new gnome command!
alias gtop='/usr/bin/gnome-system-monitor'
# Alter the ls command
alias ll='ls --color --time-style="+%b %d %Y %H:%M"'
alias ls='ls -ac'
alias lls='ls -lac'
alias la="ls --color -lAGbh --time-style='+%b %d %Y %H:%M'"
# Set background in Fluxbox
# alias bg='fbsetbg -a /home/phil/Pictures/kells/kelljesusarrest.gif'
# alias bg='fbsetbg -a /home/phil/Pictures/kells/KellsFol114rArrestOfChrist.jpg'
# alias bg='fbsetbg -a /home/phil/Pictures/kells/KellsFol007vMadonnaChild.jpg'
# alias bg='fbsetbg -a /home/phil/Pictures/kells/4evangelists.jpg'
# Become system administrator
alias god='sudo -i'
alias root='sudo -i'
# Because less is more and more is less
alias more='less'
# xterm
# alias xterm='xterm -bg black -fg green'
# Launch links or w3m with my linux links page
alias web='links2 -g /home/phil/bookmarks.html'
alias wweb='w3mmee /home/phil/bookmarks.html'
# For nano editor
alias nano='nano -w'
# Start gkrellm after stopping it in x
alias gkrellm='gkrellm -w &'
# Kill mplayer
alias kmp='killall -9 mplayer & killall -9 gnome-mplayer'
nano .~/bashrc
# creating aliases
nano .~/bash_aliases
# login into ssh and type
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment