Show me your .bashrc and I'll show you mine

Here you can discuss every aspect of Debian. Note: not for support requests!

Show me your .bashrc and I'll show you mine

Postby mzilikazi » 2006-12-29 02:50

There are lots of handy things you can add to a .bashrc to make life easier. I for one hate to type apt-get update when agu will do just fine. :)

Code: Select all
[ -f /etc/profile ] && . /etc/profile
export LS_OPTIONS='--color=auto'
alias mce="LANG=c mcedit -b"
alias mc="LANG=c mc -b"
#Make apt easier
alias agu="sudo apt-get update"
alias agug="sudo apt-get upgrade"
alias acs="apt-cache search"
alias acsh="apt-cache show"
alias agi="sudo apt-get install"
alias dpl="dpkg -l|grep"
alias acp="apt-cache policy"
alias agr="sudo apt-get remove"
alias agf="sudo apt-get -f install"
alias dpi="sudo dpkg -i"
alias dif="sudo dpkg -i --force-overwrite"
alias acd="apt-cache depends"
alias h="history"
alias edit="leafpad"
# Update the locate db
alias udb="sudo updatedb"

# Some nice directory listing features
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
alias la="ls -al"

# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Easier directory navigation
alias ..="cd .."
User avatar
mzilikazi
Forum Ninja
 
Posts: 3321
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

Postby thamarok » 2006-12-29 09:17

Haha.. lazy to type nowadays, huh? :twisted:
Code: Select all
alias xmoto='/usr/games/xmoto'
alias ragnarok='cedega "C:/Games/Ragnarok/kro.exe"'
alias rbattle='cedega "C:/Games/RBO/rbo.exe"'
alias vicecity='cedega "C:/Games/GTA: Vice City/gta_vc.exe"'
alias takenap='perl /root/nap.pl "xmms /root/nap.mp3"'
export GTK2_RC_FILES=$HOME/.gtkrc-2.0


I'm more of the gaming guy.. and that takenap Perl script just makes the screen go to Digital Power Saving Mode while playing a MP3 file through XMMS.. neat :P
thamarok
 

Postby Grifter » 2006-12-29 15:24

i think /usr/games is in your path already thamarok, so you don't need the xmoto alias, you can just type xmoto anyway (:
Eagles may soar, but weasels don't get sucked into jet engines...
Grifter
 
Posts: 1572
Joined: 2006-05-04 07:53
Location: Svea Rike

Postby thamarok » 2006-12-29 19:43

Grifter wrote:i think /usr/games is in your path already thamarok, so you don't need the xmoto alias, you can just type xmoto anyway (:


It's not in my path, and I don't prefer to have it in my path..
thamarok
 

Postby meon » 2006-12-29 19:52

thamarok wrote:
Grifter wrote:i think /usr/games is in your path already thamarok, so you don't need the xmoto alias, you can just type xmoto anyway (:


It's not in my path, and I don't prefer to have it in my path..


Correct me if I'm wrong. Aren't you root usually?

As a user my PATH is :
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
User avatar
meon
 
Posts: 164
Joined: 2006-09-11 08:45

Postby thamarok » 2006-12-29 20:11

My path:
Code: Select all
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11"

And yes, I'm root; I never have set up a user.. It is even for me something that I don't understand why I don't have /usr/games/ in my PATH :P
Code: Select all
Server:~# xmoto
bash: xmoto: command not found
Server:~# /usr/games/xmoto
Server:~#
thamarok
 

Postby mzilikazi » 2006-12-29 20:28

thamarok wrote:And yes, I'm root; I never have set up a user..

Why not?
User avatar
mzilikazi
Forum Ninja
 
Posts: 3321
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

Postby thamarok » 2006-12-29 21:11

mzilikazi wrote:
thamarok wrote:And yes, I'm root; I never have set up a user..

Why not?


Let's not talk about that. I'm root and STFU :wink:
thamarok
 

Postby hcgtv » 2006-12-29 21:14

thamarok wrote:I'm root and STFU :wink:

I'm bert, nice to meet you :)
Bert Garcia - When all you have is a keyboard
User avatar
hcgtv
 
Posts: 518
Joined: 2006-11-17 23:03
Location: Charlotte, NC

Postby mzilikazi » 2006-12-29 23:02

thamarok wrote:Let's not talk about that. I'm root and STFU :wink:


We'll see who has to STFU when you make a simple typo and nuke your entire / ;)

To the Linux noobs - logging in to your desktop as root is unnecessary AND dangerous. Even M$ has learned that lesson. I'd say more but this has already gotten waaaay off topic.
User avatar
mzilikazi
Forum Ninja
 
Posts: 3321
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

Postby osmo » 2006-12-30 01:37

Back on topic. I left out some of the weird stuff that's not useful for others and censored my email.

$HOME/.bashrc
Code: Select all
source /etc/bash_completion
source $HOME/.ansicolor
source $HOME/.bash_aliases

set -o noclobber
eval `dircolors -b`

export BROWSER='lynx'
export EDITOR='nano'
export EMAIL='...'
export HISTCONTROL=ignoredups
export NAME='Osmo Salomaa'
export PATH=$PATH:/sbin:/usr/sbin:/opt/bin:$HOME/bin
export PS1="\n$COLOR_RED_LIGHT\u @ \w\n$COLOR_PURPLE_LIGHT$ $COLOR_RESET"
export PYTHONSTARTUP="$HOME/.pythonstartup"

if [[ -n $DISPLAY ]]; then
    export BROWSER='epiphany -n'
    export EDITOR='leafpad'
fi


$HOME/.ansicolor
Code: Select all
COLOR_BLUE="\[\033[0;34m\]"
COLOR_BLUE_LIGHT="\[\033[1;34m\]"
COLOR_BROWN="\[\033[0;33m\]"
COLOR_CYAN="\[\033[0;36m\]"
COLOR_CYAN_LIGHT="\[\033[1;36m\]"
COLOR_GRAY="\[\033[1;30m\]"
COLOR_GRAY_LIGHT="\[\033[0;37m\]"
COLOR_GREEN="\[\033[0;32m\]"
COLOR_GREEN_LIGHT="\[\033[1;32m\]"
COLOR_PURPLE="\[\033[0;35m\]"
COLOR_PURPLE_LIGHT="\[\033[1;35m\]"
COLOR_RED="\[\033[0;31m\]"
COLOR_RED_LIGHT="\[\033[1;31m\]"
COLOR_RESET="\[\033[0m\]"
COLOR_WHITE="\[\033[1;37m\]"
COLOR_YELLOW="\[\033[1;33m\]"


$HOME/.bash_aliases
Code: Select all
alias .....='cd ../../../..'
alias ....='cd ../../..'
alias ...='cd ../..'
alias ..='cd ..'
alias chown-osmo='sudo chown -R osmo:osmo *'
alias chown-root='sudo chown -R root:root *'
alias cp='cp -i'
alias edit-fstab='sudo $EDITOR /etc/fstab'
alias edit-interfaces='sudo $EDITOR /etc/network/interfaces'
alias edit-menu='sudo $EDITOR /boot/grub/menu.lst'
alias edit-sources='sudo $EDITOR /etc/apt/sources.list'
alias edit-xorg='sudo $EDITOR /etc/X11/xorg.conf'
alias egrep='egrep --color=auto'
alias ftp='ftp -p'
alias gdm='sudo /etc/init.d/gdm'
alias grep='grep --color=auto'
alias ifdu='sudo ifdown eth0 && sudo ifup eth0'
alias l='ls --classify --almost-all'
alias ll='ls --classify --almost-all --format=single-column'
alias lll='ls --classify --almost-all --format=long'
alias ls='ls --color=auto'
alias mount-iso='sudo mount -o loop -t iso9660'
alias mv='mv -i'
alias p='python2.5'
alias r='R --quiet --no-save'
alias rm='rm -i'
alias untar.bz2='tar -xvjf'
alias untar.gz='tar -xvzf'
User avatar
osmo
 
Posts: 60
Joined: 2006-03-15 14:40
Location: Finland

Postby mzilikazi » 2006-12-30 03:19

osmo wrote:Back on topic. I left out some of the weird stuff that's not useful for others and censored my email.


Hey you've got some good stuff in there. Thanks. :)
One suggestion tho. Instead of aliasing tar and friends you can apt-get install unp then just
Code: Select all
unp file.tgz
unp file.zip

etc etc
User avatar
mzilikazi
Forum Ninja
 
Posts: 3321
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

Postby osmo » 2006-12-30 05:56

mzilikazi wrote:One suggestion tho. Instead of aliasing tar and friends you can apt-get install unp

Nice!
Code: Select all
$ unp
[...]
currently supported extensions and formats are
tar[.gz,.bz2], gz, bz2, Z, ar/deb, rpm, shar, rar, arj, zip, LHa, cab, ace,
tnef, uu (mail, news), mime, hqx, sea, zoo, pmd, cpio, afio, lzop
User avatar
osmo
 
Posts: 60
Joined: 2006-03-15 14:40
Location: Finland

Postby Harold » 2006-12-30 06:13

PS1="\u \w \$ "

eval "`dircolors -b`"
alias ls='ls --color=auto'
alias lsa='ls -a'
alias ll='ls -l'
alias lla='ll -a'

alias apt-file='sudo apt-file'
alias apt-get='sudo apt-get'
alias chmod='sudo chmod'
alias chown='sudo chown'
alias dpkg='sudo dpkg'
alias dpkg-reconfigure='sudo dpkg-reconfigure'
alias dselect='sudo dselect --expert'
alias halt='sudo halt'
alias locate='sudo locate'
alias ntpdate='sudo ntpdate north-america.pool.ntp.org'
alias orphaner='sudo orphaner --purge'
alias reboot='sudo reboot'
alias updatedb='sudo updatedb'
alias vim='sudo vim'
alias which='sudo which'

alias aconfig='./configure --prefix=/usr &> configlog.txt && vim configlog.txt'
alias black-box='black-box --nosound --nofullscreen'
alias date='date -R'
alias debcrunch='cd /packages/ && apt-ftparchive packages . | gzip > Packages.gz && apt-get update'
alias search='apt-cache --names-only search'
alias show='apt-cache show'
alias update='apt-get update && apt-get dist-upgrade'

alias sf='xinit /usr/bin/startfluxbox'
alias sg='xinit /usr/bin/gnome-session'
alias sk='xinit /usr/bin/startkde'
alias sw='xinit /usr/bin/wmaker'
Harold
 
Posts: 1502
Joined: 2005-01-07 00:15

Postby thamarok » 2006-12-30 08:39

mzilikazi wrote:
thamarok wrote:Let's not talk about that. I'm root and STFU :wink:


We'll see who has to STFU when you make a simple typo and nuke your entire / ;)

To the Linux noobs - logging in to your desktop as root is unnecessary AND dangerous. Even M$ has learned that lesson. I'd say more but this has already gotten waaaay off topic.


Check your PM
thamarok
 

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable