The different versions of linux have broadly similar approaches for the path but as per the recent RPI3 thread at Problem installing in RPi3: onoff library and later - #44 by Costas the syntax to “permanently” add an entry to the path on a Raspberry Pi takes the following syntax:
echo 'export PATH=$PATH:/opt/nodejs/bin/' >> ~/.bashrc
Having changed the path you can simply edit the .baschrc file with nano at a later date if you wish.