I only have access to the server via a terminal and I can't use graphical tools such as GParted!
I want to create a new partition from a part of the root (about 768mb) for swap.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda 20G 1.3G 18G 7% /
udev 10M 0 10M 0% /dev
tmpfs 199M 4.9M 194M 3% /run
tmpfs 100M 12K 100M 1% /run/user
tmpfs 5.0M 4.0K 5.0M 1% /run/lock