Find the answer to your Linux question:
Results 1 to 4 of 4
Hello users How to create a BASH script to setup the user environment (.profile) so the bash prompt includes Hostname,Current working Directory and the Version of bash. Note: I don't ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2012
    Posts
    2

    User environment


    Hello users

    How to create a BASH script to setup the user environment (.profile) so the bash prompt includes Hostname,Current working Directory and the Version of bash.

    Note: I don't need anyone to solve my question i need only hints or explanation would be helpful.

    Thank you

  2. #2
    Linux Newbie
    Join Date
    Mar 2010
    Posts
    152
    Have a look at Bash Prompt HOWTO.
    Programming and other random guff: cat /dev/thoughts > blogspot.com (previously prognix.blogspot.com)

  3. #3
    Just Joined!
    Join Date
    Oct 2012
    Posts
    2
    Hi JohnGraham,
    Prompting is not a problem .. the real problem is how to reach the user environment (.profile) ?

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,356
    In case of new users:
    Have a look at the skeleton section of
    Code:
    man useradd
    In case of existing and "real" users:
    Ask them to insert it.
    The $HOME is by definition the realm of the person who owns it.

    In case of existing and "system" users:
    Write a one-time script to deploy it.
    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •