Since you asked about environment variable manipulation in general, I found the
set command very useful when I first came across it - it simply prints (to standard out) a list of all the currently active environment variables. Useful for double-checking you've sorted things properly - though I have a feeling it might only work for bash.
And to expand on zhelezov's method to set paths, you can execute that command from a shell, though it will remain active only in that shell and only until the shell is closed (e.g. if you started an xterm, set some variables, closed xterm and then opened xterm again, it'd be a new shell and your custom variables wouldn't be set). Also, the "$PATH:" at the front is not technically necessary (though a good idea) - what it does is substitute your current PATH variable at the start of the right hand side, so
dir1,... dirN get added onto the end of your existing path. If you want to explicitly set path to "/home/foo" and nothing else, then
Code:
export PATH=/home/foo
will do exactly that. Of course, in the
vast majority of cases, you'll simply want to add another directory onto your existing path, so using the "$PATH:" format is preferable.