40

I'm trying to put in an email the temperature outside in degrees. On my Mac, the degree symbol (°) is Option+Shift+8. But I'm writing the email in Thunderbird on an Ubuntu 10.10 with the default US English keyboard layout. What key combination do I use to get the degree symbol under X11?

EDIT: Gert successfully answered the question... but, bonus points for any easier to use keystroke than what's in his answer!

11 Answers 11

50

Set up a Compose key. On Ubuntu, this is easily done in the keyboard preferences, “Layout” tab, “Options” subdialog. Caps Lock is a good choice as it's pretty much useless (all remotely serious editors have a command to make the selection uppercase for the rare times it's needed).

Press Compose followed by two characters (occasionally three) to enter a character you don't have on your keyboard. Usually the resulting character combines the two characters you type, for example Compose ' a enters á and Compose s s enters ß. The degree symbol ° is one of the less memorable combinations, it's on Compose o o.

4
  • 15
    Compose o o is a lot easier to remember than Ctrl Shift u B 0 enter. "o" because ° is an o.
    – Josh
    Dec 13, 2010 at 19:37
  • 3
    +1 voted Keyboard Feature of the Month by the Keyboard Feature of the Month Committee (i.e. me)
    – msw
    Dec 14, 2010 at 14:02
  • 1
    Following the links, I found this way to "test drive" A Compose key that won't persist when you restart X: %xmodmap -e "keysym Super_L = Multi_key" ... Super_L is the left "windows-button" keycode; use xev to find any keycode you want. Apr 21, 2012 at 5:27
  • 3
    At least Ubuntu 18.04 also has Compose * 0 and Compose 0 * sequences for °. All mappings are in /usr/share/X11/locale/en_US.UTF-8/Compose.
    – lapis
    May 28, 2020 at 23:21
27

Ctrl + Shift + u (this will show an underlined u), and with those keys held down, type the unicode value (in this case B0). Then, with Ctrl + Shift still pressed, press enter. You might find that in the last step, you do not need to press enter, and that you only need release all keys.

Full list here.

5
  • When I type <Ctrl> + <Shift> + <u> into Thunderbird, I get underline turned on and a "u" character appearing. Then, "B0" just gets typed in also (still underlined) :-(
    – Josh
    Dec 13, 2010 at 14:53
  • 3
    Follow it by <enter>
    – Gert
    Dec 13, 2010 at 14:54
  • Ah ha, that's the key. Really? This is the only way? Option+Shift+8 on Mac is so much easier to remember, since Shift+8 is *...
    – Josh
    Dec 13, 2010 at 14:55
  • You can always set a hotkey or something for this.
    – Falmarri
    Dec 14, 2010 at 4:00
  • Both yours and Gilles' answers worked, but his was the one I used because it's easier for me to remember. Sorry! +1 anyway though!
    – Josh
    Dec 21, 2010 at 13:42
13

You can also use Alt Gr+Shift+0.

3
  • Damn, I am foiled again! It's a laptop keyboard and doesn't have an Alt GR key :-(
    – Josh
    Dec 13, 2010 at 18:20
  • On Ubuntu 16.04 it seems important that <kbd>Alt Gr</kbd> is pressed before <kbd>Shift</kbd>. If you find the above not working for you make sure your sequencing is correct.
    – TafT
    Jan 24, 2017 at 9:05
  • @TafT for me it works both ways on Xubuntu 16.04
    – jarno
    Jan 26, 2019 at 14:21
7

As a follow-up to @Gert's answer (since I cannot comment yet), I've found a slightly different method is required when using Raspbian Jessie:

with Ctrl and Shift held down, type u B 0 and then release all keys.

5
  • 3
    how do you type lower u and upper B when you hold shift all the time??
    – Youda008
    Aug 6, 2018 at 16:32
  • Hi, didn't see your comment sorry - with the <ctrl> held down, it will produce a lower case u Oct 21, 2018 at 23:37
  • 1
    wait, so shift is pressed whole time, but ctrl only for u and then released for B ?
    – Youda008
    Oct 22, 2018 at 8:57
  • 1
    I'm a bit late but someone else may benefit. You press CTRL+SHIFT+U and then b and 0. Then press Enter key or space key also works. You don't have to hold those keys just press once.
    – Rishab
    Dec 4, 2019 at 6:12
  • 1
    ignore case of the u/b/0 keys, just type them, then release ctrl and shift.
    – RGD2
    Apr 12, 2022 at 7:36
4

in vi

  • hold down ctrl, press and release v, release ctrl button
  • hit u and release u
  • type 00b0

the ° will appear, continue typing normal characters

this does not work at a shell/terminal prompt, this is in the VI or VIM editor.

2
  • (0) Thanks; I didn’t know about that.  (1) You can also type Ctrl+V u b 0 and then the next character you want to type, as long as it isn’t a hex digit (i.e., 0-9, A-F or a-f).  I.e., you don’t always have to type the leading zeroes.  (2) To type a Unicode character greater than U+FFFF (e.g., 🐱, 🔒, 💮 or 👍), type Ctrl+V U (i.e., Ctrl+V followed by Shift+U) and then up to eight hex digits. Dec 24, 2021 at 21:20
  • Simple and good process.
    – RRMadhav
    Jun 14, 2022 at 7:28
2

ALT+0 works for me (I'm using Gentoo Linux).

2

If you're using the US international keyboard (us_intl), you can do Alt Gr+Shift+;

1

You can find the way to display any symbol using xmodmap:

sh$ xmodmap -pke | grep degre
keycode  19 = 0 parenright agrave 0 braceright degree at degree
#             1      2        3   4      5        6   7   8

For each keycode, it shows what symbol is associated depending on the modifiers:

  1. no modifier
  2. Shift+Key
  3. mode_switch+Key
  4. mode_switch+Shift+Key
  5. AltGr+Key
  6. AltGr+Shift+Key
  7. ???
  8. ???

In that example, I can see "degree" is in 6th position and the plain key (position 1) is 0. So I can obtain the degree by pressing AltGr+Shift+0 in that order: depending on your configuration, if you press Shift first, Shift+AltGr is understood as an emulation of the Meta key which has different bindings.

0

Yeah, systems vary on this - so do Android keyboards - unless you have Google's Pixel or Nokia, you likely have some custom keyboard, not the default Android one, but so do I - I think both Swype (not available anymore, but I love it even if the skins can't be bought (or bought ones redownloaded anymore), syncing is off, etc. Nuance has dropped support - they have excellent speech recognition system available for various systems, including Android (works as keyboard) that let's you do anything you would be able with keyboard, but they should have kept the lesser version (Dragon, that's why it was called Swype + Dragon), but it's still the only one with selection/editing mode available... BUT I DIGRESS...

On most systems, there's a way to compose characters not on keyboard, and on Linux it can be highly configurable, depending on your desktop environment. For example, I have set it to 4th level of right Ctrl (So AltGr+Right Ctrl). Then I type oo to get degree symbol. There are easily found a whole load of list of characters and keys you can enter them with. I would be surprised if OS X didn't have similar compose key, but not that much if it wasn't configurable. However composing with two 'o' characters is the easiest way to get the degree symbol. The OS X advice relies on entering Unicode value of the character. That's not possible on all system, and very cumbersome to remember, especially if you need more than one composed character, like me with µMatrix/µBlock Origin :D But it does allow entering ANY unicode character, which has it's uses. On Linux you might have to do it on terminal and copy output and paste it to, say, email program. But for common characters, but non-alphabets/numbers composing is easier. Like € and ¢ (well, I don't need compose for euro, but it's "e" and "-"; cent is "c" and "|".

There were many more lacking and some more complicated answers here, so I hope this helps.

1
  • 2
    Sorry, but it’s not clear to me what you’re saying that hasn’t already been said.  Can you highlight the contributions, and cut out the digression and repetition? Dec 16, 2021 at 6:03
-1

hold down 'alt' key and while holding it down, hold down the 'shift' key too. and while holding down both of those, hold down the 'u' key. now, release all three. a 'u' with an underscore should appear. now press and release the 'b' key and then press and release the '0' (zero) key. now, press the 'enter' key. a '°' should appear.

1
  • Doens't work for me
    – mrc02_kr
    Oct 19, 2018 at 18:29
-1

This symbol is used to represent degrees in many different fields, such as angle or temperatures. It is obtained by drawing a small circle as a superscript. The Unicode of the icon is U + 00B0.

on Mac:

Using keyboard shortcuts : OPTION + SHIFT + 8

on PC:

Press and hold the ALT key and type 0 1 7 6 on the numeric keypad of your keyboard. Make sure the NumLock is on and type 0176 with the leading zero. If there is no numeric keypad, press and hold the Fn before typing the 0176 numbers of degree symbol.

on iPhone & iPad:

  • Step 1: Click the 123 button on the screen keyboard to open the number keyboard.

  • Step 2: Hold down zero (i.e. 0), and move your finger to choose the degree symbol (i.e. °).

on LaTeX:

gensymb

\usepackage{gensymb}
\begin{document}
The right angle is 90\si{\degree}.
\end{document}

textcomp

\usepackage{textcomp}
\begin{document}
The round angle is 360\si{\textdegree}.
\end{document}

siunitx

\usepackage{siunitx}
\begin{document}
Degree symbol: 45\si{\degree}.
\end{document}

circ

^{\circ}

Check out more: https://www.degree-symbol.com/

2
  • PC is not an OS/desktop so there is no PC way of entering Unicode characters. There is Windows way, BSD way, Linux, Solaris... also MacOS, you can have Linux installed on older Mac hardware which may use KDE or Gnome or ... Jan 10, 2022 at 10:51
  • question wasn't 'on any platform BUT X11'...
    – RGD2
    Apr 12, 2022 at 7:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .