LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 08: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, 09:19 PM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191

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 09:20 PM.
 
Old 08-06-2007, 09: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, 09: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, 01:03 AM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
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, 01:07 AM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
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, 02: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



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 08:33 PM
Run a C Shell using only Bash shell HSN Linux - Software 1 12-25-2006 07:44 AM
Is there a shell command for CPU temp ginda Linux - Software 5 03-12-2005 10:22 PM
Temp root privilege in program? ZX_SA Programming 1 07-22-2004 08:14 AM
building rpms as non-root user - temp probs frogman Linux - Software 2 11-23-2003 04:41 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 11:40 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
Open Source Consulting | Domain Registration