When installing Ubuntu it asked me for a name. I entered it as name (space) lastname. Now when I get to login screen, it greets me by that name. I want to change it, in fact to remove last name.
Click on the ubuntu button, search for "User" until the User Accounts application shows up, then launch it. Click on the lock button on the top right, this enables you to change your settings.
Then click on your username to change it, and that's it!
This changes the display name the system shows you. To change your actual username is a bit more complex:
From the terminal;
sudo chfn -f "FirstName LastName" *username*
where the FirstName Lastname is replaced by the desired names
You can then verify with;
getent passwd $USER | cut -d ':' -f 5 | cut -d ',' -f 1
finger -m $USER | head -n 1 | sed 's/\(.*\)Name\:\s\(.*\)$/\2/g'
Install finger if no previously installed with;
sudo apt install finger