This article will show you how to change the keyboard layout in Ubuntu 17.10.
Steps

Step 1. Update Ubuntu
Ubuntu 17.10 and newer has some options that were not found in previous versions of this system. To update the system:
- start Terminal;
- type sudo apt-get upgrade and press ↵ Enter;
- enter the password and press ↵ Enter;
- type y when prompted, then press ↵ Enter;
- wait for the system to update and then restart your computer (if prompted).

Step 2. Open the Applications menu
To do this, press "⋮⋮⋮" in the lower left corner of the screen.

Step 3. Click on Settings
This gear-shaped icon is in the Applications window. Ubuntu Settings will open.

Step 4. Click the Region & Language tab
You will find it in the upper left side of the preferences window.

Step 5. Click on +
This icon is located under the current language in the Input Sources section. A pop-up window will open.

Step 6. Select a language
Click on the language you want to use for the keyboard layout.
If the language you want is not listed, click "⋮" at the bottom of the menu, and then select a language

Step 7. Select a keyboard layout
Scroll down and find and click on the layout you want to use.

Step 8. Click Add
It's in the upper-right corner of the window. The keyboard layout will be added to the Input Sources section.

Step 9. Select the old keyboard layout
Click on the current layout. You will find it at the top of the Input Sources section.

Step 10. Click on ∨
This icon is located below the bottom keyboard layout. The new keyboard layout will move to the top of the menu (and the old keyboard layout will move down). The new layout is now the default layout.