How do you update Ubuntu MATE on the terminal? (Pi)

I’m new to Linux. :sweat_smile:
How do you update it? I guess if you just download the new update on your computer, drag it into your SD card, it will delete every app that you downloaded and files that you made.

I am not certain if it is identical for the pi as for x86. but the normal procedure is simply:

sudo apt-get update

sudo apt-get upgrade

None of the above will delete any apps you have individually downloaded or any personal files you have created

There’s also this one:

sudo apt-get dist-upgrade

And for updating the Raspberry Pi kernel:

sudo rpi-update

See also (generally for PC's but I think you can do almost all of what is written on Raspi?):