nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

How to make bash prompt permanent?

This is a discussion on How to make bash prompt permanent? within the Getting started tutorials forums, part of the Linux Getting Started category; In my RHEL 4 system, my current bash promt is \s - \v $ It is the default bash prompt. ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-18-2007, 09:26 PM
Junior Member
User
 
Join Date: Jul 2007
Location: Hyderabad
My distro: Redhat RHEL, Solaris
Posts: 29
Rep Power: 0
vaibhav.kanchan is on a distinguished road
Default How to make bash prompt permanent?

In my RHEL 4 system, my current bash promt is

\s - \v $
It is the default bash prompt.

However, I wish to make the bash prompt as
[\u@\h \W]#

I have tried to set bash prompt using command

PS1="[\u@\h \W]#"

But it remains till I logout the system. But when I logout the system, the bash prompt automatically changes to the default prompt.

I will appreciate any ideas from you. waiting for your suggestions in this case.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-18-2007, 11:46 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Any distro with shell
Posts: 958
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Add your prompt to ~/.bash_profile (/home/you/.bash_profile or /root/.bash_profile)
Code:
export PS1="my prompt"
Now after logout, it will be get activated as .bash_profile get executed every time you login back to system
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
set timeout for ssh prompt vikas027 Shell scripting 0 04-23-2008 12:06 AM
script to prompt for password for AIX shipon_97 Shell scripting 0 04-15-2008 04:45 PM
Permanent Route entry in RHEL 5 santoshdhumal Networking, Firewalls and Security 1 03-17-2008 10:12 PM
Backup mysql from shell prompt or script raj Linux software 0 07-29-2006 11:17 PM
Static Route in Linux, permanent puppen Linux software 3 04-13-2006 09:06 PM


All times are GMT +5.5. The time now is 03:27 PM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36