The methods available for a Linux computer depend on the Linux distribution and on the desktop being used. Generally it is very easy and convenient to configure your system for Esperanto, especially if your desktop is Gnome or KDE, which are the most commonly used desktop systems.  

The methods are:

Add the key combinations for the accented letters to your usual layout

Set up the Keyboard Layout

In Gnome (e.g. in Ubuntu 10.04) choose the menu items System (Sistemo), Preferences (Agordaĵoj), and Keyboard (Klavaro). Then choose the tab Layouts (Aranĝoj) and the desired layout, e.g. USA (Usono). Click on the button Options (Fasonaj agordoj). Go to the section "Set up the Esperanto keys" below in this page.

In Unity (e.g. in Ubuntu 12.10), choose menu items System Settings, Keyboard Layout, choose a layout, and click the button Options. Go to the section "Set up the Esperanto keys" below in this page.
In later versions of Ubuntu (e.g. 14.04, 15.04, 16.04) the keyboard layout is done by IBus (see also below). The just mentioned options for Esperanto are not available via the menus. However the setxkbmap method works, so you can use that (see below).

In KDE (e.g. Kubuntu 12.04 - 14.04, Mageia 4) choose menu items "K", "System Settings", "Input devices", "Keyboard", "Advanced". Mark the box next to "Configure keyboard options", Go to the section "Set up the Esperanto keys" below in this page.
In KDE (e.g. Suse 12.1...) choose menu items "K", "Configure Desktop", "Input devices", "Keyboard". Mark the tab "Advanced". Go to the section "Set up the Esperanto keys" below in this page.

In Cinnamon (Mint 17, Mint 18) choose Menu > Preferences > Keyboard > Keyboard Layouts > Choose the layout to which to add the Esperanto keys > Options. Go to the section "Set up the Esperanto keys" below in this page.
In Cinnamon (Mint 15) choose Menu > System Tools > System Settings > Regional Settings > Layouts > Choose the layout to which to add the Esperanto keys > Options. Go to the section "Set up the Esperanto keys" below in this page.
In Cinnamon (Mint 14) choose Menu > System Tools > System Settings > Personal > Keyboard layout > Layouts. Go to the section "Set up the Esperanto keys" below in this page.

In all Current Linux systems (2013), you can use the program setxkbmap to configure the keyboard layout. The command below (available since 2010) tells that program that for the layout us and its variant alt-intl (alternative international), use the left win key as a third level key and make the Esperanto accented letters accessible via the third level key with the appropriate letter key on a QWERTY keyboard.

This method is particularly useful in lightweight Linux systems, which do not have a graphical application for configuring the keyboard layout options. In all current Linux systems, whether or not they have a graphical application, you can add this single line to your ~/.bashrc file (a hidden file in your home directory - create it if it is not there):

setxkbmap -layout "us" -variant "alt-intl" -option "lv3:lwin_switch,esperanto:qwerty"

If you are using a layout other than us:alt-intl then adapt the above command for your layout (and variant). If you don't want to use the left win key, you can substitute the right alt key (ralt_switch), or some other key. In this case the following command may suffice:

setxkbmap -option "lv3:ralt_switch,esperanto:qwerty"

Reference for further details:

Set up the Esperanto keys

Expand the list item Adding Esperanto circumflexes (supersigno) (Aldonado de Esperantaj supersignoj). Choose one of the three options, e.g. To the corresponding key in a Qwerty keyboard (Al la ekvivalenta klavo en klavaro Qwerty).

Then expand the list item Key to choose 3rd level (Klavo por elekti 3-an nivelon) and mark the key(s) that you want to use as the special key for accented Esperanto letters e.g. Left Win (Maldekstra Win). To finish, click on Close (Fermi), and Close again.

Now you can type the accented letters, e.g. using Right-Alt with Shift and U for Ŭ.

Typing the accented letters using dead keys

You can choose an international layout, such as USA (Alternative international) (Usono alternativa), or United Kingdom International (with dead keys), rather than the simple USA layout. With such a layout you can type many accented letters in many languages (including Esperanto) using dead keys. For example, for a letter with a circumflex use the ^ key (Shift 6) and for a breve use the key RAlt+Shift 9 combination. These two special key combinations act as dead keys, i.e. they produce the character you want only after the next key has been pressed. It is a bit hard to type that last combination: hold down RAlt and Shift and then press 9, then press Shift (for upper case) and press the u, only then release RAlt.

In Cinnamon (ekzemple Mint 17, Mint 18) use the menus "Preferences", "Keyboard", "Layouts", click on "+", choose an arrangement from the long list, e.g. "English (US, alternative international)", "Add".

In Gnome (e.g. Ubuntu 10.4) choose the menu System (Sistemo), Preferences (Agordaĵoj), and Keyboard (Klavaro). Then choose the tab Layouts (Aranĝoj). To add a layout choose Add (Aldoni), choose the tab By language (Laŭ lingvo) and for Language (Lingvo) choose a list item e.g. English (Angla), and choose one from the list of Variants (Variaĵoj) e.g. the list item USA (Alternative international).

In KDE (e.g. Kubuntu 10.4), choose the K-menu, System Settings (Sistema Agordo), Regional & Language (Regiono & Lingvo), and Keyboard layout (Klavararanĝo). Make sure that the use of layouts is switched on (Ebligi klavararanĝojn), and look for a suitable layout in the lefthand list and tick it, e.g. USA (Usono us). Click on the green triangle button to add the chosen layout to the list Active layouts (Aktivaj klavararanĝoj). Click on it in the list, and select the prefered variant in the list Layout variant (Aranĝa devio) and click on OK (Apliki).

In LXDE (e.g. Mint LXDE), select Computer (komputilo), Applications (aplikaĵoj), Preferences (preferoj), Lxkeymap. In the lefthand list choose a country, e.g. United States (Usono), and in the righthand list choose a Variant, e.g. International with dead keys (Internacia kun mortaj klavoj). Click on Apply (Apliki) and close the window.

Fedora version 22, and some other distributions, use the configuration tool IBus (Intelligent input Bus) for multilanguage input. For Esperanto it supplies settings for the X-system and for several other methods with dead keys. (In the X-method one types for instance cx and the computer automatically changes it to ĉ, etc). To configure it click on the circular symbol in the upper right tool bar, click on the tool symbol for "All Settings" (agordaro), "Keyboard" (klavaro), "Input Sources" (enigmetodoj) and click on the "+" sign, then the three vertical dots, and type "esp" in the field at the bottom of the dialog. Choose for instance "Esperanto (x-sistemo (m17n))", "Add" (aldoni), and close the dialog. Go to the top right corner of the screen and click on the language chooser. Choose the layout that you want to use. You can change it at any time.

In Ubuntu (versions 14.04, 15.04, 16.04) iBus is also used but the options are less extensive. To change the keyboard layout go to: System settings > Text entry > + > English (UK, international with dead keys), or choose some other layout.

Note on using an “international” keyboard arrangement
When you use a so-called “International” keyboard, the key which has the two symbols “ and ' on it also acts as a dead key. That means that to type a double quote or an apostrophe one has to press that key twice (with Shift for a double quote) or type that key once and then the spacebar.

Inserting a special character

Many programs have menus for inserting special characters, but the methods described above are much more convenient for serious work in Esperanto.