Open main menu

CDOT Wiki β

SRA840 Lab2

Revision as of 16:36, 22 January 2009 by Evets (talk | contribs) (Added my answer)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SRA840 Lab1

REFERENCES

FreeBSD ports

Answers

Stephen Carter

When I logged in to FreeBSD for the first time, I was confronted with the following:

$|

...and nothing else. This is, of course, a bare shell; it's not even bash! That's right, the default shell is /bin/sh! So, for this lab, I decided to install the bash shell, asap! Now, I know technically the lab is about getting to use ports, and we're supposed to use pkg_add and all that stuff, but that was giving me trouble because I hadn't set up an internet connection yet. So I said to myself "screw ports!" and got creative. (Be afraid...) I thought "maybe I messed up something in the install, and ports wasn't installed or something." So, I started the sysinstall program (which is the FreeBSD installer), to see if I could fix it. It turns out, you can install programs this way! So to install bash, from the installer screen, you go through the menus to "Configure -> Packages -> CD/DVD -> shells" and then select bash, then ok, and then select install. Then the installer will go off and use prts to install your program, and Voila! Bash!

...of course I has to tell FreeBSD I actually wanted to *use* this new shell, so to do that I did a "whereis bash" to find out where bash was located, and the "chsh -s /usr/local/bin/bash evets" to change the shell for the user evets (me). After a quick logout and log back in, I had my pretty bash shell back! Success! And so, I immediately ran "PS1='C:${PWD//\//\\\}>". If you don't know what that does, and you're near a bash command prompt, try it out for yourself and see. ;) --scarter4 21:36, 22 January 2009 (UTC)