We can easily change our keyboard layout in Linux by Terminal commands. It is easier and faster at many times compared to GUI. You can change layout by just up or down arrow key. Remember, many cases happened when people change their layouts and they can't revert them back. Avoid it by number 1 step below.

1. Set Default Layout

Yes, you must do command for default layout first (US) or you will find difficulty to revert the setting into default again.

setxkbmap  -layout us

2. Set Arabic Layout

We have 'parent language' (Arabic) and also 'children language' as variant/dialect (Buckwalter etc.).

setxkbmap -layout ara
To set Arabic with Buckwalter variant, use this command:
setxkbmap -layout ara -variant buckwalter
Note: Buckwalter is an Arabic variant which has similar result with Multikey program on Windows while you may type A for ALIF, B for BA', T for Ta' (phonetically associated keys), and so on. Buckwalter variant helps us to write Arabic easily without any additional tool.

3. Revert Layout to Default

To revert your layout into default, call previous command. That's why you should do the first command before. Use up arrow key on Terminal so you can call the previous commands and choose
setxkbmap  -layout us

, ,