Unix .profile file

A colleague has advised me...
"In your .profile, define the following"

So, I need to find and open my .profile file.

I have CRT and Secure FTP access to the server from a Windows computer.

Using CRT, I can use VI as an editor (but I'm not so great at it).

Where is my .profile and how do I open it?

Thanks,

Geoff
gswitzAsked:
Who is Participating?
 
woolmilkporcConnect With a Mentor Commented:
Hi,

its in your home directory.

There is a shell variable $HOME containing the path to your home directory, and there is also a shortcut "~".

So either use

vi $HOME/.profile

or

vi ~/.profile


wmp
0
 
woolmilkporcCommented:
Here is a short "vi" tutorial:

http://www.eng.hawaii.edu/Tutor/vi.html

0
 
gswitzAuthor Commented:
I cannot see this file using the FTP Client. Is this typical?
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
woolmilkporcCommented:
Yes,

this could be because it starts with a dot (kind of a hidden file).

What is your ftp client?

Anyway, on a terminal you should see it with

ls -la
0
 
mikelfritzCommented:
can you use ssh instead?
0
 
mikelfritzCommented:
you should see the file if you cd to your home dir and then issue "ls -al"
0
 
TomuniqueCommented:
It may be that you don't have one.  as most ftp clients should show dot files.
but if you issue the vi commands as woolmilk specified, even if it doesn't exist, it will created it.

If you are using an ftp client, and are downloading it to your windows box.. then you don't need VI.  just use notepad or whatever on Windows.

Now, critical here... IF YOU EDIT ON WINDOWS... ensure you transfer the file back and forth using the ASCII option (generally just type ascii at the ftp client command prompt, or in some transfer option window) within FTP otherwise you'll be opening more questions wondering why there's ^M characters in your file, and your settings in .profile don't work right.


0
 
mikelfritzCommented:
And if you do see the ^M in the file on SCO you can use "dtox" to fix it.
0
 
mikelfritzCommented:
SCO's built in client won't show the "." files with a plain "dir", issuing "dir .profile" does show it.  And you can do get's and put's of "." files...

The profile that a user uses depends on the shell they use.  For instance, sh uses .profile, csh uses .cshrc, ksh uses .kshrc

You could look at /etc/passwd to see what shell the user is set to.  An example is mine set for ksh:

mpope1:x:220:50::/usr/mpope1:/bin/ksh

0
 
gswitzAuthor Commented:
Thanks.
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.

All Courses

From novice to tech pro — start learning today.