- Create or edit a file in your home directory called .profile (make sure you include the ".") using TextEdit or the editor of your choice. Note that files beginning with a period are invisible in Finder, so to use TextEdit you may have to open it with Terminal using the following command:
open ~/.profileIf you get the following error, the file does not yet exist and needs to be created:
The file /Users/randomuser/.profile does not exist.
- Add one of the following lines to the file based on your preferred editor:
- TextEdit (may have side effects):