[olug] best practices for modifying root's profile in Suse
Jay Swackhamer
Jay at RebootTheUser.com
Wed Mar 24 15:11:18 UTC 2004
to be able to actively use your command history, use vi to edit/search the
command line
#in bash or ksh
set -o vi
#in sh
EDITOR=vi
export EDITOR
esc = enter command history
use vi keys to navigate - hjkl
search using '/TERM' i.e. esc -> /vgextend
> dthacker9 at cox.net wrote:
>
>>I'm want to build a standard root prompt with some extra info built into
>> it. The file /etc/profile cautions against modifying it, and suggests
>> that I use /etc/profile.local I created the /etc/profile.local and added
>> the PS1 string, but didn't seem to get a read on login. For now I've
>> added a .profile to /root. Is that the way you usually do this?
>>
>>
>
> If there's a change I think is wonderful enough that every user ought to
> have it (aliasing ls to ls -F), then I'll change the core files like
> /etc/profile, but if it's specific to one user then use the
> user-specific files in their own home directory. If I personally think
> something is a good change but know that some people will disagree with
> my opinion (shell prompts), I'll put it in the files in /etc/skel so
> that new users can more easily find it and comment it out or change it
> to something else.
>
> I typically use a two-line prompt, with time and $PWD in the first line,
> user at host and history number in the second. I use bash whenever it's
> available, where the history number is useful. Anyone know how to get
> the current time into a ksh prompt? Closest I've been able to get is my
> login time. Also, once upon a time I had a couple lines in my .kshrc to
> allow me to use up and down arrows to scroll my command history, but I
> can't remember or find them anymore. Anyone have a pointer on that?
> Going back to ksh after using bash feels like someone cut off a couple
> fingers.
>
> Tim
>
> --
> Tim & Alethea
> www.ChristTrek.org
>
>
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
>
--
Jay Swackhamer
Reboot The User
15791 West Dodge Road
Suite 135
Omaha, NE 68118
(402) 933-6449
(402) 933-6456 Fax
http://www.RebootTheUser.com
More information about the OLUG
mailing list