FreeBSD Log: Changing Your Shell in FreeBSD (Unix)
May072007 10:10PM — John —Ok, so you’re just logged in and you’re already tired of sh, I would be to. Good thing it’s pretty easy to switch to bash, which we installed during the original FreeBSD installation. To change the shell we’re going to use the built in chsh (Change Shell) program as root. So here’s what you type once you’ve connected and logged into your FreeBSD server, replacing yourusername with your username1.
# sudo chsh yourusername]
For example, I entered…
# sudo chsh john
This should bring up your user file with various information about your account, the only thing you need to worry about is the line that says “Shell:”, here’s what mine looks like:
#Changing user information for john.
Login: john
Password: [removed]
Uid [#]: 1001
Gid [# or name]: 1001
Change [month day year]:
Expire [month day year]:
Class:
Home directory: /home/john
Shell: /bin/sh
Full Name: John Stone III
Office Location:
Office Phone:
Home Phone:
Other information:
To edit this file you’re going to need to use your arrow keys, press down until you get to the shell line, then right until you get past the first /. Then use the delete key to remove all of the stuff after it. Then press “i” and type “usr/local/bin/bash”. Then press escape, then “:x” and hit enter to save the file. If at any time you mess up you can press escape then “:q!” to exit without saving changes, the you can try again with the command above.
This is what my file looked like after I edited it.
#Changing user information for john.
Login: john
Password: removed
Uid [#]: 1001
Gid [# or name]: 1001
Change [month day year]:
Expire [month day year]:
Class:
Home directory: /home/john
Shell: /usr/local/bin/bash
Full Name: John Stone III
Office Location:
Office Phone:
Home Phone:
Other information:
Now you can exit and when you log back in you should see a lovely new shell prompt.
[john@freebsd ~]$

Leave a comment
Post Info
Filed In:
Tips & Tricks
Tags:
FreeBSD, FreeBSD Log, Software, UNIX
Permalink:
Related Posts
Free iTunes Song



No Comments