sudo is only necessary when installing into administrative directories such as /etc or /usr
In this case it's more preferred to use ./bootstrap --prefix=/path/to/install/directory
then ./b2 -j[1-4]
I recommend setting the processor concurrency to 2 more than the # of logical cores, so if you have 4 then set it to 6, I've cut compiling times down by 15-30 mins.
No need to instruct installing nano as that's a default package in Ubuntu 16.04+