LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-03-2005, 02:11 AM   #1
Soulful93
Member
 
Registered: Dec 2003
Location: Denver, CO
Distribution: SuSE 9.2 Slackware 10.1
Posts: 137

Rep: Reputation: 15
.bashrc .bash_profile


I was wondering if a kind soul would be willing to post their .bashrc and or your .bash_profile for me. I've already set my default shell to bash, and I'd like to set some aliases up for myself.

I'm not sure on what need's to go into to the above files for them to both function properly. I don't know how to script them. Any help will be apreciated...
 
Old 05-03-2005, 02:51 AM   #2
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
my bash_profile is as follows, because I want my sessions to be consistent.

Code:
if [ -f ~/.bashrc ]; then
     source ~/.bashrc
fi
And well, the cleaned up version of my users bashrc, here goes:
Code:
export VISUAL=/usr/bin/nano
export EDITOR=/usr/bin/nano
# aliases
alias pois='clear && logout'
alias vihreš='printf "\e[32m\n"'
alias punainen='printf "\e[31m\n"'
alias musta='printf "\e[30m\n"'
alias sininen='printf "\e[34m\n"'
alias xine-dvd='xine --auto-play --auto-scan dvd'
alias perl-module-install-MCPAN='perl -MCPAN -e shell'
alias bbslash='bbslashdot -b firefox -x 875 -y 920'
alias wwwo='cat /var/log/apace2/access_log | tail -n 100 | grep -iv localhost'
alias grassy='fbsetbg -f /share/images/wallpapers/Grassy.jpg'
alias fbwall='fbsetbg -f /share/images/wallpapers/fluxbox.img'
alias asenna='./configure && make && make install'
alias flightsim='ys' # I never remember the bin (;

# bashcomplete
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
if [ "$PS1" ] && [ $bmajor -eq 2 ] && [ $bminor '>' 04 ] \
   && [ -f /etc/bash_completion ]; then # interactive shell
        # Source completion code
        . /etc/bash_completion
elif [ "$PS1" ] && [ $bmajor -eq 3 ] \
   && [ -f /etc/bash_completion ]; then # interactive shell
        # Source completion code
        . /etc/bash_completion
fi
unset bash bmajor bminor

# PS1 moddings
PS1='[\033[01;33m\t\033[m] [\u@\h] \w# '

# allways use dircolors, even if su
eval `dircolors -b /etc/DIR_COLORS`

# if a ssh session, lets screen it
if [ "$SSH_CONNECTION" ]; then
    if [ -z "$STY" ]; then
        # Screen is not currently running, but we are in SSH, so start a session
        exec screen -d -R -S ssh
    fi
fi

# a nifty calendar software, shows me my appintments for the next 3 weeks to come upon login. 
clcal -w 3
Thats about it, hoper this gave you some ideas what people do with bashrc.. (;
 
Old 05-03-2005, 02:59 AM   #3
Soulful93
Member
 
Registered: Dec 2003
Location: Denver, CO
Distribution: SuSE 9.2 Slackware 10.1
Posts: 137

Original Poster
Rep: Reputation: 15
Good lord that's the biggest .bashrc I've ever seen! Thank you for the help.
 
Old 05-03-2005, 03:00 AM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,341

Rep: Reputation: 73
Also you can create a ~/.bash_logout with :
Code:
clear
This way, the terminal is cleared when you exit
 
Old 05-03-2005, 03:02 AM   #5
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
Quote:
Originally posted by keefaz
Also you can create a ~/.bash_logout with :
Code:
clear
This way, the terminal is cleared when you exit
thanks for the tip.. why didnt I think of that.. lol.. been using my 'clear && logout' alias for years now.. wont prolly get used to a simple logout anymore.. heh
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bashrc vs. bash_profile mikeshn Linux - General 9 02-10-2008 01:46 PM
bashrc or bash_profile ? ARCIS_house Linux - Newbie 6 07-21-2005 02:09 PM
~/.bashrc, ~/.bash_profile Sinope Linux - Newbie 6 08-17-2004 02:40 AM
.bashrc or .bash_profile? statmobile Linux - Newbie 1 02-04-2004 09:08 PM
.bashrc vs .bash_profile xor3 Linux - Newbie 1 08-16-2003 12:52 PM


All times are GMT -5. The time now is 02:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration