trying to add .profile for root

I am trying to add a .profile for root

I cd to /

do
vi .profile

and get

/var/tmp/ExGXaaqa Read only file system...

What does this mean?

It means the root file system is mounted in such a way that you cannot modify it. man mount to read more and perhaps even find out how to change that (but of course, if the physical disk is a read-only disk like a DVD, you simply can't write to it).

That means that /var/tmp has lost its sticky bit and/or 777 permissions. As root, do:

# chmod 1777 /var/tmp 

If you don't have root access, just use redirection. For example, if you want to create an alias for the clear command:

# echo "alias 'cl=clear'" >> .profile 

Ouch, right, not the root file system, correct-

actually it appears that I was some how in maint mode.

I logged out and back in and now it is working.

THanks for the comments guys.