1) Do I just type cp .bash_profile .bash_profile.ORIG into the
terminal right after I open it?
Yes. You are essentially making a backup copy of your current
~/.bash_profile (assuming there is one).
2) How do I load it into my text editor?
It depends on what text editor you intend to use. I do this:
$ emacs ~/.bash_profile
but you could also do:
$ gedit ~/.bash_profile
There are heaps of text editors, of course, including
pico for in-terminal editing. So really just take your pick. If you don't have a favourite editor,
nano is a good starter.
The line should not be
It should be:
As Theophrastus says in the comment, this is a horrible security practise and generally should not be done. I think it's better practise to designate a directory where you code, and a directory where executables get stashed for testing and that is in
$PATH. But if this is a school assignment, I guess you should do as your teacher says.
3) And how do I export it?
Add this line after the
Note: your teacher is wrong. You do not need to restart. How would that be possible if you were maintaining a server? you'd kick everyone off and your users would be furious! All you need to do to load in new settings is:
$ source ~/.bash_profile