How do you change the text-cursor/caret in Terminal to block, I-Beam, or underline.

  • Gnome terminal or some other kind of GUI? Maybe the tty?
    – Braiam
    Jul 29, 2014 at 22:47

3 Answers 3


In recent versions of gnome-terminal, you can use the following escape sequences to change the cursor:

  • \e[0 q or \e[ q: reset to whatever's defined in the profile settings
  • \e[1 q: blinking block
  • \e[2 q: steady block
  • \e[3 q: blinking underline
  • \e[4 q: steady underline
  • \e[5 q: blinking I-beam
  • \e[6 q: steady I-beam

You can print these by e.g. echo -ne '\e[5 q'.

This has the advantage/disadvantage (based on your use case) compared to the gconftool method that it influences the given tab only, and not all the tabs that use the given profile.

  • This looks awesome! Unfortunately, I can't use it (running gnome-terminal 3.14.1). Is there anything I should do to enable this? (it does work in xterm)
    – iago-lito
    Jul 21, 2015 at 13:16
  • 4
    This feature is available since vte-0.40 which officially pairs with gnome-terminal-3.16 (although you can probably upgrade your vte only and keep gnome-terminal-3.14).
    – egmont
    Jul 22, 2015 at 7:55
  • Great, let's upgrade then. Cheers!
    – iago-lito
    Jul 22, 2015 at 7:57
  • great answer! I followed these instructions to get gnome-terminal 3.16 askubuntu.com/a/625250/114821
    – netimen
    Aug 16, 2015 at 9:55
  • NB: if you're using tmux, you'll probably need to tell tmux how to reset the cursor shape by adding something like this to your .tmux.conf, or the first sequence won't work: set -ga terminal-overrides ",*256color*:Se=\\E[0 q"
    – ash
    Jul 29, 2018 at 14:50

In addition to the GUI method, you can also change the cursor shape from the command-line:

$ gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape <VALUE>

The possible values are "block" to use a block cursor, "ibeam" to use a vertical line cursor, or "underline" to use an underline cursor.

To get the current value:

$ gconftool-2 --get /apps/gnome-terminal/profiles/Default/cursor_shape
  • 1
    you already have my up-vote for the step-by-step GUI method ;) Jul 29, 2014 at 21:18
  • Note: This changes the caret not only in the current terminal, but also in all other current and future gnome-terminal tabs of the same profile, just as if you opened the graphical preferences editor and switched it there.
    – egmont
    Sep 13, 2016 at 15:44
  • @egmont Indeed, I've just read your answer. Now depending if it has to be persistent or not, we have the choice. Thanks Sep 13, 2016 at 16:02

To change your text-cursor/caret:

  1. Open up Terminal.
  2. Right click the terminal window.
  3. Hover your mouse over the option Profiles.
  4. Select Profile Prefrences.

As seen here:

Just a terminal window

5.Here you will find the option, Cursor Shape.

Cusor shape

6.Enjoy using Terminal with a different Caret.

  • where is the cursor shape?
    – sugab
    Mar 13, 2016 at 22:49

You must log in to answer this question.

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