1833042 Members
2545 Online
110049 Solutions
New Discussion

Re: $ to #

 
SOLVED
Go to solution
Bill Ogle_1
Occasional Advisor

$ to #

If i have a login that gets to the $ sign, how do it get it back to the # sign?

Any help would be greatly appreciate.
7 REPLIES 7
Lasse Knudsen
Esteemed Contributor
Solution

Re: $ to #

PS1='# '
In a world without fences - who needs Gates ?
Bill Ogle_1
Occasional Advisor

Re: $ to #

Ok, so when i get to the # sign, how do it get it so it shows my path on the screen. Ex.

# cd /u1
/u1#

...
federico_3
Honored Contributor

Re: $ to #



insert in your $HOME/.profile the lines:

PS1='#'
export PS1


and run
. $HOME/.profile


federico
John Palmer
Honored Contributor

Re: $ to #

To get the current directory:-

PS1='$PWD #'
CHRIS_ANORUO
Honored Contributor

Re: $ to #

Try PS1=$(whoami)`uname -n` '[${PWD##*/}] '
This will show you current directory where you are, username and the system name
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
CHRIS_ANORUO
Honored Contributor

Re: $ to #

Try export PS1=$(whoami)`uname -n` '[${PWD##*/}] '
This will show you current directory where you are, username and the system name
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
federico_3
Honored Contributor

Re: $ to #


insert in your .profile the following :


PS1='$PWD # '

export PS1


federico