As you did not write what flavor of Linux you are using, my answer may be not suiting. If it is Debian derived (Debian, Ubuntu, Linux Mint), you could use
sudo dpkg-reconfigure keyboard-configuration
which would guide you through all the possible sections, such as language, keyboard variants (which is what you are asking about), and even special keyboard bindings. Keep in mind that this changes the layout system-wide (not only for your user).
On the other hand, most desktop environments (Gnome, KDE, etc.) provide graphical interfaces for user-based settings. On KDE4, you can find this e.g. in Settings->Systemsettings, selecting "input devices" in the hardware section.
You can find more answers on this at AskUbuntu.