I'm trying to do this part of my assessment:
Show and explain the contents of the profile file.
But I cannot open it. I tried ls- profil
, but that didn't work.
Edit: Melebius helped me to find the answer. Thanks dude!
I'm trying to do this part of my assessment:
Show and explain the contents of the profile file.
But I cannot open it. I tried ls- profil
, but that didn't work.
Edit: Melebius helped me to find the answer. Thanks dude!
The correct filename of the current user’s profile is
~/.profile
(where~
is a shortcut for the current user’s home directory).You can use the command
cat
to just print the file out:For long files, the file viewer
less
can come in handy:(Press q to quit
less
.)Of course, you can open the file using your favorite editor, e.g.
vi
(a command-line based editor) orgedit
(the default GUI text editor in Ubuntu) to view (and modify) it.(Type
:q
Enter to quitvi
.)