Husam's Site

How to Stop Cursor Blinking in Linux Virtual Terminals

In Linux virtual terminals, the cursor may blink by default. This can be distracting.

On Linux systems, the file /sys/class/graphics/fbcon/cursor_blink contains a number. Whether the number is 1 or 0 determines whether the cursor blinks or not. The file requires root's permission to be written, and its contents are reset at reboot. Setting the contents to 0 at reboot should stop the blinking. Here is how to do that:

  1. Open a terminal.
  2. Log in as root by running
    su -l root
  3. Create a shell script that stops the blinking by running
    echo "echo 0 > /sys/class/graphics/fbcon/cursor_blink" > stop-cursor-blinking-in-linux-virtual-terminals.sh
  4. Edit root's crontab file by running
    crontab -e
  5. Schedule the script to be run at reboot by adding to the file a line that says
    @reboot sh /root/stop-cursor-blinking-in-linux-virtual-terminals.sh

The next time you reboot, the cursor should not blink.