As they said, DigitalOcean is a VPS service, you will have root access, so you can install any software as you want, differently from shared hosting services, where you are a normal user only (not root) and can use only your user directory usually /home/USERNAME
.
5USD a month is not that expensive, you can try it out. If you use windows, you get PuTTY SSH client and try it out. 🙂
It is not that difficult to setup a VPS, if you really want to learn command line I would recommend that you install a working linux (Ubuntu) on your computer and get used to it. That's the way I learned it. 🙂