@hermes-deus-grego, you can use the shutdown command to turn the Ubuntu PC off - that's the easy part.

The harder part is using another computer on your network to turn the Ubuntu PC on via Wake-On-Lan. I use a Raspberry Pi because it doesn't require much power and it's always on. You could test it using your phone before investing in a Raspberry Pi using this app.

I made this post about using Wake-On-Lan a while ago:
https://www.triggercmd.com/forum/topic/49/turn-on-a-computer