How to change command line prompt?

Matt Graham mhgraham at crow202.org
Fri Jan 2 19:52:29 MST 2015


> On 2015-01-02 19:17, joe at actionline.com wrote:
>> How can I change the command line prompt from the current:
>> "joe at joe-dell-Inspiron-3542:>"
>> to just: "joe:>"
On 2015-01-02 18:31, Keith Smith wrote:
> http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html

To expand on what others have written, that's:

export PS1='\u:>'

in your ~/.bashrc .  This is *not* optimal though.  It'd be far more 
useful to do something like

export PS1='\h:\w\$ '

...since you usually know who you are, but you might not know which 
machine you're logged in to, and having the full path to the dir you're 
in is almost always useful if you have more than one dir that's named 
the same thing.

>> Also, I'd like to be able to turn the touchpad off and on
>> but the only suggested method I have found to do this
>> does not work for me:  synclient TouchpadOff=1

Hm.  This works fine for me, but I'm using Gentoo, and other distros 
may do different things with the X modules for various input devices.  
For synclient to work, IIRC, the X server has to load the synaptics 
module, and the synaptics module has to claim the touchpad device.

-- 
Crow202 Blog: http://crow202.org/wordpress
There is no Darkness in Eternity
But only Light too dim for us to see.


More information about the PLUG-discuss mailing list