How to type Unicode on Linux

To type Unicode on Linux, press Ctrl + Shift + U, type the hex code (b0 for °) and press Enter or Space. It works in GNOME and any app using IBus. For symbols you use daily, set up a Compose key: Compose, o, o types °.

By Sudarshan BabarUpdated 3 min read

Ctrl + Shift + U (IBus and GTK)

On Ubuntu, Fedora and most distributions running GNOME, Unicode entry is built in:

  1. Press Ctrl + Shift + U. An underlined u appears at the cursor.
  2. Type the hex code point, for example 2713 for ✓ or 1f600 for 😀.
  3. Press Enter or Space.

This is handled by the IBus input framework and by GTK itself, so it works in Firefox, Chrome, LibreOffice, GNOME Terminal and most desktop apps. On KDE Plasma it depends on the input method: with IBus it behaves as above, while Fcitx 5 offers Unicode input through its own shortcut and plug-in. Look up any code with our Unicode character lookup.

The Compose key

The Compose key is the Linux answer to Mac Option shortcuts, and it is easier to remember because the sequences are mnemonic. Press Compose, release it, then type two or three characters that “draw” the symbol.

Choose a key to act as Compose. In GNOME Settings → Keyboard → Compose Key (under Special Character Entry), pick Right Alt, Menu or Caps Lock. On other desktops, set the XKB option compose:ralt in your keyboard settings.

SymbolCompose sequenceSymbolCompose sequence
°o o©o c
®o r™t m
€= e£L -
±+ -×x x
÷: -½1 2
—- - -–- - .
→- >≠= /
é' eñ~ n
ü" ußs s

The full list lives in /usr/share/X11/locale/en_US.UTF-8/Compose, and you can add your own in ~/.XCompose.

Character apps: GNOME Characters and KCharSelect

GNOME Characters (the “Characters” app) is the equivalent of the Mac Character Viewer. Search by name, click a character and choose Copy. KCharSelect does the same on KDE and also shows the code, the HTML entity and related characters. Both are ideal when you do not know a code.

In the terminal and in code

In a terminal, Ctrl + Shift + U works in GNOME Terminal but not in every emulator. In Bash you can print a character by its code with printf '\u00b0\n', and in Vim you can use digraphs: press Ctrl + K then DG for °, Co for © or Eu for €. Vim also accepts Ctrl + V, then u and the hex code, in insert mode. For escapes in source code, our Unicode converter writes them in every common format.

Layouts with a symbol level

XKB layouts such as “English (US, intl., with dead keys)” and “English (US, alt. intl.)” add a third level under Right Alt, as on Windows US-International. Enable one under your keyboard settings and switch with Super + Space. They are the fastest route for accented letters. See also our guide to the Compose key.

Missing glyphs

If a character appears as a box, the font is missing. Installing the Noto fonts (packages such as fonts-noto or google-noto-*) and fonts-noto-color-emoji covers almost all of Unicode.

Which method to use

Most people end up combining two. Ctrl + Shift + U is universal, but you have to know or look up the code, so it suits rare characters. The Compose key is faster for the dozen symbols you type every week, because the sequences are easy to guess: o and c make ©, two hyphens and a third make —, and a quote before a vowel makes an accent. For browsing and discovery, keep GNOME Characters or KCharSelect pinned to your dock.

On Wayland sessions, the same tools work, because GNOME and KDE implement input methods natively. If you use a minimal window manager without IBus, start the IBus daemon or configure Fcitx 5; otherwise only XCompose sequences and copying from a character app will be available.

Adding your own Compose sequences

Create ~/.XCompose with the line include "%L" to keep the defaults, then add rules such as <Multi_key> <c> <k> : "✓". Log out and back in, and Compose, c, k types a check mark. GTK apps under IBus read this file too. It is a tidy way to give yourself shortcuts for the math symbols or arrows you use most.

Frequently asked questions

How do I type Unicode characters in Ubuntu?

Press Ctrl + Shift + U, type the hex code (for example 2713) and press Enter or Space. It works in GNOME and IBus apps.

Why doesn’t Ctrl + Shift + U work in my app?

The app is not using IBus or GTK input, as with some terminals, Qt apps without IBus, or Electron apps with a different input method. Use the Compose key or copy from GNOME Characters.

How do I set up a Compose key on Linux?

In GNOME Settings → Keyboard → Compose Key, choose a key such as Right Alt. On other desktops set the XKB option compose:ralt.

How do I type the degree symbol on Linux?

Press Ctrl + Shift + U, type b0 and press Enter, or with a Compose key press Compose, o, o.

Sources

  1. Unicode Consortium: Code charts
  2. Unicode Consortium: Frequently asked questions