• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 23267
  • Last Modified:

What is .profile in UNIX? How do I set it up?

What is .profile in UNIX? How do I set it up?

I am using HP  UX

Thax.
_Esam

0
_Esam
Asked:
_Esam
  • 3
  • 3
  • 2
1 Solution
 
TintinCommented:
.profile is a special file in your HOME directory that gets invoked when you login (if your login shell is sh, ksh, bash etc)

You can use any editor to change the contents as it is a simple file.

The most typical things that people change in their .profile is their PATH and prompt, eg:

PATH=$PATH:$HOME/bin
export PATH
PS1='mypath$ '
export PS1
0
 
_EsamAuthor Commented:
Hi Tintin,

I am using HP UX with ksh I think (perdon my ignorace....)

How do I find this .profile file and edit it??


When I do an ls in my home directory,,, I do not see any .profile file..

Let me know..

Thax.
_Esam
0
 
TintinCommented:
Any files that are prefixed with a . are "hidden" when you do a straight ls

use

ls -la

to see all files (including dot files)

if .profile doesn't exist in your home directory, simply create it with your preferred editor.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
_EsamAuthor Commented:
I think I need to use vi to create one...

How do I do that?

Which directory I go to first?
I know I can open the vi with just the vi command...

How do I create the .profile file and save it ... and in which directory I save it to???


Please let me know..

Thax..
_Esam
0
 
TintinCommented:
To create a new .profile, just do

cd
vi .profile
0
 
gheistCommented:
Is this a homework question???
Why don't you as your system admin?

I doubt one actually working with HP-UX does not know where to stick .profile.
0
 
_EsamAuthor Commented:
>Is this a homework question???
No, it's not.
And, I don't like this kind of discouraging interjections!!!


>I doubt one actually working with HP-UX does not know where to stick .profile.
Well, you are wrong! and this is not the proper way to answer some question.

0
 
gheistCommented:
Have you contacted your system administrator regarding setting environment ???
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now