I normally append a sudo to every command that installs, or edits, you will usually need the root permissions to complete the actions properly.
if you run a command and ti doesn’t work because you for got to sudo you can use what is called a Bang Bang to recall your last command and just put sudo in front of it.
For example:
[code]
ln -s var/www/fog /var/www/html/fog[/code]
Would fail, you need root privileges to move things to that folder, or you have to be an owner of that folder.
so to re run the command with the terminal still open you can either press the up arrow and scroll back to the beginning and type sudo, which sometimes is the best bet. Sometimes I make errors when my fingers get excited and type isntall 😛
or you can use the BangBang
[code]
sudo !![/code]
There are others this is just easiest.