<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: OS prompt in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3525001#M17052</link>
    <description>You are right. For the # to show up, your effective UID has to be 0. This means you cannot use su. &lt;BR /&gt;&lt;BR /&gt;In root's .bashrc, you might just want to put in:&lt;BR /&gt;&lt;BR /&gt;PS1="\h-\u#"&lt;BR /&gt;&lt;BR /&gt;-p</description>
    <pubDate>Thu, 14 Apr 2005 13:59:13 GMT</pubDate>
    <dc:creator>Paul Cross_1</dc:creator>
    <dc:date>2005-04-14T13:59:13Z</dc:date>
    <item>
      <title>OS prompt</title>
      <link>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3524996#M17047</link>
      <description>Default prompt shows:&lt;BR /&gt;[username@hostname directory] and an indicator # if root user and $ if another user.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;[oracle@myhostname mydir]$&lt;BR /&gt;&lt;BR /&gt;Using command PS1="..." I can adjust to show more data in the prompt. What variables or parameters or syntax should I use to show the OSUser and the indicator # (for root) or the $ for another users?</description>
      <pubDate>Thu, 14 Apr 2005 10:23:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3524996#M17047</guid>
      <dc:creator>Tonatiuh</dc:creator>
      <dc:date>2005-04-14T10:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: OS prompt</title>
      <link>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3524997#M17048</link>
      <description>man bash and search for PS1. After a few matches the list is given.&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Thu, 14 Apr 2005 10:45:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3524997#M17048</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2005-04-14T10:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: OS prompt</title>
      <link>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3524998#M17049</link>
      <description>And the answer is &lt;BR /&gt;PS1="\u\$"&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Thu, 14 Apr 2005 10:50:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3524998#M17049</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2005-04-14T10:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: OS prompt</title>
      <link>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3524999#M17050</link>
      <description>This depends on the shell you use. &lt;BR /&gt;I'm assuming you use bash, which is the default shell. If so, the prompt commands are all in the man page for that shell under PROMPTING. &lt;BR /&gt;&lt;BR /&gt;For your example, to set the prompt to show the hostname,dash,userid followed by the $ or # do:&lt;BR /&gt;&lt;BR /&gt;PS1="\h-\u\$"&lt;BR /&gt;&lt;BR /&gt;ciao!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Apr 2005 10:52:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3524999#M17050</guid>
      <dc:creator>Paul Cross_1</dc:creator>
      <dc:date>2005-04-14T10:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: OS prompt</title>
      <link>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3525000#M17051</link>
      <description>Wim, Paul,&lt;BR /&gt;&lt;BR /&gt;The $ symbol, just show the same symbol always, but does not change with root or another user, as the default.</description>
      <pubDate>Thu, 14 Apr 2005 13:23:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3525000#M17051</guid>
      <dc:creator>Tonatiuh</dc:creator>
      <dc:date>2005-04-14T13:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: OS prompt</title>
      <link>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3525001#M17052</link>
      <description>You are right. For the # to show up, your effective UID has to be 0. This means you cannot use su. &lt;BR /&gt;&lt;BR /&gt;In root's .bashrc, you might just want to put in:&lt;BR /&gt;&lt;BR /&gt;PS1="\h-\u#"&lt;BR /&gt;&lt;BR /&gt;-p</description>
      <pubDate>Thu, 14 Apr 2005 13:59:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3525001#M17052</guid>
      <dc:creator>Paul Cross_1</dc:creator>
      <dc:date>2005-04-14T13:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: OS prompt</title>
      <link>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3525002#M17053</link>
      <description>Are you using '$' or '\$' at the end of your PS1 string?&lt;BR /&gt;&lt;BR /&gt;'\$' is the inbuilt which gets translated to $ or # for a non-priv/priv user.</description>
      <pubDate>Thu, 14 Apr 2005 19:45:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3525002#M17053</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-04-14T19:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: OS prompt</title>
      <link>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3525003#M17054</link>
      <description>Oh, I forgot.. Beware of shell expansion when setting PS1.&lt;BR /&gt;&lt;BR /&gt;If you:&lt;BR /&gt;&lt;BR /&gt;PS1="\u@\h blah\$"&lt;BR /&gt;&lt;BR /&gt;It won't do what's expected (as the \'s will protect the 'u', the 'h' and a '$' symbol).&lt;BR /&gt;&lt;BR /&gt;So always echo $PS1 back after setting it to make sure it's what you expected.&lt;BR /&gt;&lt;BR /&gt;You may need to escape the \'s (\\$ for instance).&lt;BR /&gt;&lt;BR /&gt;Check your /etc/bashrc for examples.</description>
      <pubDate>Thu, 14 Apr 2005 20:02:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3525003#M17054</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-04-14T20:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: OS prompt</title>
      <link>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3525004#M17055</link>
      <description>argh! my answer was totally wrong! I was sleeping at the wheel. su - gives you an effective uid of 0, i confused real uid vs effective uid. sorry.&lt;BR /&gt;&lt;BR /&gt;Stuart is right, you need to escape the \ like this:&lt;BR /&gt;&lt;BR /&gt;PS1="\h-\u\\$"&lt;BR /&gt;&lt;BR /&gt;-p</description>
      <pubDate>Fri, 15 Apr 2005 11:25:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/os-prompt/m-p/3525004#M17055</guid>
      <dc:creator>Paul Cross_1</dc:creator>
      <dc:date>2005-04-15T11:25:17Z</dc:date>
    </item>
  </channel>
</rss>

