Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

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

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

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

#1 Post by mzilikazi »

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 .."

thamarok

#2 Post by thamarok »

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

Grifter
Posts: 1554
Joined: 2006-05-04 07:53
Location: Svea Rike

#3 Post by Grifter »

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...

thamarok

#4 Post by thamarok »

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..

User avatar
meon
Posts: 161
Joined: 2006-09-11 08:45

#5 Post by meon »

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

thamarok

#6 Post by thamarok »

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:~#

User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#7 Post by mzilikazi »

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

thamarok

#8 Post by thamarok »

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:

User avatar
hcgtv
Posts: 500
Joined: 2006-11-17 23:03
Location: Charlotte, NC

#9 Post by hcgtv »

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
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#10 Post by mzilikazi »

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
osmo
Posts: 55
Joined: 2006-03-15 14:40
Location: Finland

#11 Post by osmo »

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
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#12 Post by mzilikazi »

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
osmo
Posts: 55
Joined: 2006-03-15 14:40
Location: Finland

#13 Post by osmo »

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

Harold
Posts: 1482
Joined: 2005-01-07 00:15
Been thanked: 3 times

#14 Post by Harold »

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'

thamarok

#15 Post by thamarok »

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

User avatar
amc
Posts: 65
Joined: 2006-06-08 17:05
Location: Sofia, Bulgaria

#16 Post by amc »

mzilikazi, nice .bashrc
I will get it, if you dont mind ;)

--

edit

hahah ;)
Last edited by amc on 2006-12-31 09:55, edited 1 time in total.
ouim.org
eilo.org
trance.nu

using debian lenny

User avatar
mzilikazi
Forum Account
Forum Account
Posts: 3282
Joined: 2004-09-16 02:14
Location: Colorado Springs, CO

#17 Post by mzilikazi »

amc wrote:mzilikazi, nice .bashrc
I will get it, if you dont mind ;)
Sorry but no it is copyrighted and later today I will also file for a patent on farting so be prepared. ;)

thamarok

#18 Post by thamarok »

mzilikazi wrote:
amc wrote:mzilikazi, nice .bashrc
I will get it, if you dont mind ;)
Sorry but no it is copyrighted and later today I will also file for a patent on farting so be prepared. ;)
o_0

User avatar
DeanLinkous
Posts: 1570
Joined: 2006-06-04 15:28

#19 Post by DeanLinkous »

actually I already have that one....

method by which one relieves pressure thru a orifice

As you can see I have made sure it covers everything from passing gas to deflating anything, to releasing pressure from a slow cooker. Now if I had a million bucks to buy err.... APPLY for my patent then I would totally be set.

Post Reply