How to Install and Setup Cursor AI Code Editor on Ubuntu

Prasad SawantPrasad Sawant
2 min read
  1. Go to https://www.cursor.com/

  2. Click “Download for Free“

  3. Save the AppImage file in Downloads which could be named as “cursor-0.42.3x86_64.AppImage“

  4. Open terminal in Downloads

  5. Make the AppImage executable

     $ chmod +x cursor-0.42.3x86_64.AppImage
    
  6. Try running AppImage temporarily from the terminal to check if there is any issue

     $ ./cursor-0.42.3x86_64.AppImage
    

    If the Cursor AI Code Editor opens without any error or issue then we are good to go but if there are any issues like I faced in Ubuntu 24.04 LTS is:

     dlopen(): error loading libfuse.so.2
    
     AppImages require FUSE to run. 
     You might still be able to extract the contents of this AppImage 
     if you run it with the --appimage-extract option. 
     See https://github.com/AppImage/AppImageKit/wiki/FUSE 
     for more information
    

    Then install the libfuse2 library like this:

     $ sudo apt update
     $ sudo apt install libfuse2
    

    After installing the libfuse2 rerun the AppImage file like this:

     $ ./cursor-0.42.3x86_64.AppImage
    

    If the Code Editor opens without any error, we can proceed to the next step.

  7. Now, extract the contents of the AppImage

     $ ./cursor-0.42.3x86_64.AppImage --appimage-extract
    

    This will create a new directory squashfs-root in the same location where the AppImage is located i.e. in the Downloads folder itself.

  8. Now move the AppImage and Cursor AI icon to a different stable location ~/.local/bin and we’ll create a folder inside this directory as cursor.

     $ mkdir ~/.local/bin/cursor
     $ mv cursor-0.42.3x86_64.AppImage ~/.local/bin/cursor
     $ mv squashfs-root/cursor.png ~/.local/bin/cursor
    
  9. Now let’s edit the desktop launcher

     $ gedit squashfs-root/cursor.desktop
    

    Replace the existing file content with the below content and don’t forget to replace the username with your username of ubuntu which is visible in the terminal every time

     [Desktop Entry]
     Name=Cursor
     Exec=/home/username/.local/bin/cursor/cursor-0.42.3x86_64.AppImage %U
     Terminal=false
     Type=Application
     Icon=/home/username/.local/bin/cursor/cursor.png
     StartupWMClass=Cursor
     X-AppImage-Version=241016kxu9umuir
     Comment=Cursor is an AI-first coding environment.
     MimeType=x-scheme-handler/cursor;
     Categories=Utility;
    

    Save the file and close the gedit editor.

  10. Now it’s time to move the desktop launcher from squashfs-root to ~/.local/share/applications to make it visible in Applications:

    $ mv squashfs-root/cursor.desktop ~/.local/share/applications
    
  11. Give the cursor.desktop file executable permissions:

    $ chmod +x ~/.local/share/applications/cursor.desktop
    
  12. Now remove the squashfs-root directory from Downloads

    $ rm -rf squashfs-root
    

    NOTE: Keep in mind that almost every command is run from Downloads folder/directory.

Now go build some great AI projects in Cursor AI. Happy Coding!

1
Subscribe to my newsletter

Read articles from Prasad Sawant directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Prasad Sawant
Prasad Sawant