I changed my Keyboard Layout from Swedish to English, but now my password doesn’t work and I can’t login. I need a way to change the keyboard layout at the login screen without having access to the keyboard or a way to enter the password using characters not available on the keyboard itself.

  • Press Ctrl+Alt+F1 to switch console mode. Type your username and press Enter and also now type your password.

  • Next type sudo dpkg-reconfigure keyboard-configuration and hit Enter type your password again and follow screen instruction.

As usual, it will prompt you for the model of keyboard (what the keyboard is), and then for the keyboard layout (what the keys should do)

To apply new settings, restarting the keyboard-setup service with this

 sudo service keyboard-setup restart
  • 4
    But how am I supposed to type sudo service keyboard-setup restart if I can't login because of the layout – Cedric Martens Jan 25 '18 at 12:50
  • Why switch to console mode? Can't I just open a terminal? – Colonel Panic Mar 18 at 11:08

For anyone who's been facing the same problem and nothing worked here's an idea boot from the recovery mode then scroll down to root then write the following command to reset your password "passwd yourUserName" then enter your new password for that username hope this helps :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy