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!
81 Answer
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:
cat ~/.profileFor long files, the file viewer less can come in handy:
less ~/.profile(Press q to quit less.)
Of course, you can open the file using your favorite editor, e.g. vi (a command-line based editor) or gedit (the default GUI text editor in Ubuntu) to view (and modify) it.
vi ~/.profile
gedit ~/.profile(Type :q Enter to quit vi.)