There is a more widely implemented standard terminal setting for switching cursor visibility between high visibility, normal visibility and invisibility. Some terminals don't make a difference between normal and high, and there's no guarantee that one or the other will or will not blink. In terminfo, emit the cvvis, cnorm or civis string (e.g. tput cvvis). The corresponding termcap entries are vs, ve and vi.

These setting will not survive a terminal reset, so you may find that it doesn't survive the launching of many full-screen applications. You can overcome this difficulty by adding the cursor configuration changing sequence to your terminal's reset string.

On a terminfo-based system using ncurses, save your terminal's terminfo settings to a file with infocmp >>~/etc/terminfo.txt. Edit the description to change the rs1 (basic reset) sequence, e.g. replace rs1=\Ec by rs1=\Ec\E[?12l. With some programs and settings, you may need to change the rs2 (full reset) as well. Then compile the terminfo description with tic ~/etc/terminfo.txt (this writes under the directory $TERMINFO, or ~/.terminfo if unset).

On a termcap-based system, grab the termcap settings from your termcap database (typically /etc/termcap). Change the is (basic reset) and rs (full reset) sequences to append your settings, e.g. :is=\Ec\E[?12l:. Set the TERMCAP environment variable to the edited value (beginning and ending with :).

Some terminals and other applications give you more options:

The xterm cursor blinks if the cursorBlink resource is set to true or the -bc option is passed on the command line. The blink rate is customizable through the cursorOnTime and cursorOffTime resources.

Some other GUI terminal emulators can blink the cursor; check their configuration dialog box.

The Linux PC (VGA) console has a number of cursor settings; their exact meaning and applicability depends on the underlying VGA implementation (Linux framebuffer or video card). If your default cursor blinks, try turning the hardware cursor off and the software cursor on with something like printf '\033[17;127?c' (the first parameter 17 gives you the software cursor without a hardware cursor, and the second parameter set to 127 makes it essentially inverse video). See above regarding terminal resets.

In Emacs, M-x blink-cursor-mode toggles the cursor's blinking. Put (blink-cursor-mode 0) in your ~/.emacs to turn it off. This is a global setting and does not apply in a text terminal.

This will (at least for me) screw up the terminal line breaks (on line overflow). Use square brackets, escaped: For example, BLUEBOXNOBLINK="\033[?17;0;60c", then PS1="\[$BLUEBOXNOBLINK\]\[$BROWN\]\u \[$CYAN\]\W: \[$NC\]"
–
Emanuel BergAug 13 '12 at 12:21

In the linux tty you can use the escape sequence "\e[?48;0;64" or whatever you like but this doesn't work in tmux/vim. Tmux/Vim issue a "cnorm" command on startup which by default contains a "\e[?0c". You can see that this undoes the effects of the above setting. You need to change cnorm to the above sequence in order for the TUI applications to reset the cursor to your preference. More info on this by Gilles but if you are looking for a quick fix try this:

in /etc/rc.local and created a systemd service for it using online instructions. However, I noticed that sometimes after boot the cursor is still blinking. It would be good to know the correct way to permanently turn off cursor blinking via sysfs on a modern systemd system, does anyone have any tips? Some distributions have /etc/sysfs.conf but I am running Arch and don't find this file in sysfsutils or elsewhere.

As a temporary fix I ran the following command

sudo zsh -c 'echo -n "\033[?17;0;255c" >> /etc/issue'

Some experimentation showed that the '255c' at the end works better than '127c' listed above, it produces a white rather than grey cursor.