16

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.

mchid
  • 43,546
  • 8
  • 97
  • 150
dakky
  • 161
  • Defining that "display name" is confusing and not correct: "display name" is the name of the video port in use. This question should be edited defining those items as "username" and "Full user name". – Gaetano Gallozzi Sep 30 '22 at 08:46

2 Answers2

14

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!

enter image description here

This changes the display name the system shows you. To change your actual username is a bit more complex:

Jorge Castro
  • 71,754
  • Right now I feel so stupid I wasted almost two hours looking for that option, telling myself all the time "I know it's in user accounts settings" but it never struck me to try and click on the name. :) – qualebs Nov 02 '14 at 06:06
  • Doesn't work for me. Having unlocked window, I click on my user name and nothing happens. I am on Ubuntu 14.04. – Dmitrii Volosnykh Dec 11 '14 at 06:06
11

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

OR

finger -m $USER | head -n 1 | sed 's/\(.*\)Name\:\s\(.*\)$/\2/g'

Install finger if no previously installed with;

sudo apt install finger