Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Mar 2004 11:01:31 -0600
From:      "Kevin D. Kinsey, DaleCo, S.P." <kdk@daleco.biz>
To:        Bob Perry <rperry4@earthlink.net>
Cc:        FreeBSD-Questions <freebsd-questions@freebsd.org>
Subject:   Re: Help Setting Up .bashrc
Message-ID:  <40436C6B.1060305@daleco.biz>
In-Reply-To: <4043619E.4010605@earthlink.net>
References:  <4043619E.4010605@earthlink.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------080109090001000704070408
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Bob Perry wrote:

> Hello,
>
> My environment variables indicate SHELL=/usr/local/bin/bash and
> ENV=/home/rperry/.shrc.  My understanding is that bash reads
> ~/.bashrc for interactive shells and $ENV for non-interactive shells.
> I don't have the ~/.bashrc file.  Neither do I have a ~/.bash_profile,
> or a ~/.bash_login file.
>
> I also see where the startup files for bash are .profile and .bashrc.
> One of the settings in my .profile indicates that ENV=$HOME/.shrc;
> export ENV.
>
> I've read where bash will read other files (e.g., .shrc, etc.) when 
> it's own
> initialization files are not present but I'd like to set up the 
> appropriate
> bash files anyway.  I've seen examples of the .bashrc file in some text
> but was looking for something from within FreeBSD.  I found some
> /src/share/skel/dot.* files but none for bash.  Can anyone tell me if 
> such
> sample files exists and where I might find them?  Do I need really need
> them?
>
> Thank you.
> Bob Perry
>

Well, do you want any environment variables present? ;-)
You can probably get by with what you've got until you
figure out you need more.  And, you can just put whatever
it is in whatever files bash *will* read....

Since bash isn't part of FBSD, I don't know that you'll
find any example dotfiles "within FreeBSD".  I'd look in
either /usr/local/share/* or /usr/local/doc, or wherever
the bash manpage or website suggests that the
documentation might be....

You can make your own, of course.  Look at .shrc., .profile,
etc (i.e.) some of the files that *are* default installed,
and see what's there.  Mostly these are things like
aliases (shortcuts?), setting up your CLI prompt in
a fashion you desire, chooing a default editor, pager,
terminal environment, etc.  Also, you *will* likely
want to set a PATH for bash, in whatever rc file(s)
it will read.

I use tcsh, so I don't know that my files would
be much help, but I'll attach .cshrc anyhow,
you can see what I do for my environment, and
it might be good for a laugh....

Kevin Kinsey
DaleCo, S.P.

--------------080109090001000704070408
Content-Type: text/plain;
 name=".cshrc"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename=".cshrc"

# $FreeBSD: src/share/skel/dot.cshrc,v 1.13 2001/01/10 17:35:28 archie Exp $
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
#

alias h		history 25
alias j		jobs -l
alias ls	ls -FG
alias la	ls -a
alias lf	ls -FA
alias ll	ls -lAFG
alias mail      mutt
alias pico      nano
alias dir       ls
alias rm        rm -i
alias me	whoami
alias a:	"mount_msdosfs /dev/fd0 /floppy && cd /floppy && ls -l"
alias tm	/usr/local/textmaker5/textmaker/tm
alias up	ping -t2 yahoo.com
alias dial	ppp -nat -background tdon
alias undial    "source /kadmin/.cshrc && /bin/kill -9 `cat /var/run/tun0.pid`"
alias stat      "echo ' ' && uname -a && echo ' ' && uptime && echo ' ' && df && echo ' ' && top -I"
alias cls	clear

# A righteous umask
umask 22

set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin /usr/local/libexec/nut)

setenv  CVS_RSH ssh
setenv	EDITOR	nano
setenv	PAGER	more
setenv	BLOCKSIZE	M
setenv  CLICOLOR
setenv	TERM xterm-color

set prompt = "<%B$user%b@%B%m%b> [%/] [%B%T%b] \n#"

if ($?prompt) then
	# An interactive shell -- set some stuff up
	set filec
	set history = 500
	set savehist = 500
	set mail = (/var/mail/$USER)
	if ( $?tcsh ) then
		bindkey "^W" backward-delete-word
		bindkey -k up history-search-backward
		bindkey -k down history-search-forward
	endif
endif

--------------080109090001000704070408--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40436C6B.1060305>