LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices



Reply
 
Search this Thread
Old 08-06-2007, 09:53 PM   #1
stefaandk
Member
 
Registered: Jun 2005
Distribution: Centos
Posts: 215

Rep: Reputation: 30
Temp bash shell for root


Coming from Linux environments I'm used to the bash shell. Used to having coloured dirs and prompt with the path in it etc.

I can do all this stuff via my bash profile but I need it for root in BSD.

I don't want to permanently change the shell from csh to bash as I'm not the only one using this box but when I do login as root how can I change it to bash just for my session, assuming this is an option?

Thanks.
 
Old 08-06-2007, 10:19 PM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
I believe typing in /bin/bash would get you a bash shell.
ofcourse bash should be installed. you could also try /bin/sh

just type exit after your done and you should be back to csh.

Last edited by w3bd3vil; 08-06-2007 at 10:20 PM.
 
Old 08-06-2007, 10:34 PM   #3
stefaandk
Member
 
Registered: Jun 2005
Distribution: Centos
Posts: 215

Original Poster
Rep: Reputation: 30
Thanks, easier then I thought. But how can I get it to load my profile?

I created a .bash_profile file in the root dir.
 
Old 08-06-2007, 10:37 PM   #4
stefaandk
Member
 
Registered: Jun 2005
Distribution: Centos
Posts: 215

Original Poster
Rep: Reputation: 30
Not to worry found it, it's .bashrc like on Linux, I thought it would be .bash_profile like on osx.
 
Old 08-07-2007, 02:03 AM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
If you've installed the bash port (or the package), it's actually /usr/local/bin/bash. The bash shell is not part of the base system, thus the /usr/local.

Quote:
Originally Posted by stefaandk
...it's .bashrc like on Linux, I thought it would be .bash_profile like on osx.
See the manpages for bash(1).

Quote:
When bash is invoked as an interactive login shell, or as a non-inter-
active shell with the --login option, it first reads and executes com-
mands from the file /etc/profile, if that file exists. After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
in that order, and reads and executes commands from the first one that
exists and is readable.
...
When an interactive shell that is not a login shell is started, bash
reads and executes commands from ~/.bashrc, if that file exists.
 
Old 08-07-2007, 02:07 AM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
P.S. One more thing for you to read (might be helpful):
http://www.freebsd.org/doc/en_US.ISO...l#TOOR-ACCOUNT
 
Old 08-07-2007, 03:07 AM   #7
reverse
Member
 
Registered: Apr 2007
Distribution: Gentoo
Posts: 337

Rep: Reputation: 30
Quote:
Not to worry found it, it's .bashrc like on Linux, I thought it would be .bash_profile like on osx.
I use ".bash_profile" on Linux. And no .bashrc.
 
  


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
Root user bash shell look like "bash-2.05b#" and /root empty y2pk001 Linux - Security 6 03-22-2007 09:33 PM
Run a C Shell using only Bash shell HSN Linux - Software 1 12-25-2006 08:44 AM
Is there a shell command for CPU temp ginda Linux - Software 5 03-12-2005 11:22 PM
Temp root privilege in program? ZX_SA Programming 1 07-22-2004 09:14 AM
building rpms as non-root user - temp probs frogman Linux - Software 2 11-23-2003 05:41 PM


All times are GMT -5. The time now is 09:56 PM.

Main Menu
Advertisement
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