Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 May 2000 13:34:39 -0600 (CST)
From:      Ryan Thompson <ryan@sasknow.com>
To:        Archimedes <pstanfield@home.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: I may be new....but.
Message-ID:  <Pine.BSF.4.21.0005091329170.59948-100000@ren.sasknow.com>
In-Reply-To: <000801bfb992$eba7f500$0cf71018@c272234a>

next in thread | previous in thread | raw e-mail | index | archive | help
Archimedes wrote to freebsd-questions@FreeBSD.ORG:

> Ok, this is really stumping me.
> 
> In linux, by default, I think you get the basic shell or "bash", this
> shell allows you to simply hit the up arrow to go through a bunch of
> your previous command line commands.
> 
> So I install FreeBSD, and lo and behold, I can find no such feature in
> the basic (bourne?) shell.  Is there one?  How about for other shells
> like csh and ssh?

Actually, csh is the default shell in FreeBSD.  Type `h`  (aliased to show
the last few lines of history), and, to execute the command numbered
"123" for example, simply type !123 at your command prompt.  (Or !! to
execute the LAST command).  If you want to execute, say, the third last
command that you did, try !-3.  Note that you can append to the command.

For example, if you just finished typing "ll -d a*", and received more
than a screenful, instead of typing all of that again, simply type 
"!! | more" to pipe the output through your pager.

That being said, bash is available in the ports/packages.  Assuming you
opted to install the ports collection when you installed FreeBSD, type 
"cd /usr/ports/shells/bash2 && make all install"

Then, add /usr/local/bin/bash to /etc/shells, type "chsh" from your user
account and use bash as your shell.  Note that it is generally not
considered a good idea to use bash as your root shell.

> 
> I may be lazy but it is such a useful feature I can't believe its not
> there somewhere.  help me find it please.
> 

-- 
  Ryan Thompson <ryan@sasknow.com>
  Systems Administrator, Accounts
  Phone: +1 (306) 664-1161

  SaskNow Technologies     http://www.sasknow.com
  #106-380 3120 8th St E   Saskatoon, SK  S7H 0W2



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0005091329170.59948-100000>