How to Install and Setup Cursor AI Code Editor on Ubuntu
Learn to install and set up Cursor AI Code Editor on Ubuntu with this step-by-step guide. Perfect for developing AI projects
Go to https://www.cursor.com/
Click “Download for Free“
Save the AppImage file in Downloads which could be named as “cursor-0.42.3x86_64.AppImage“
Open terminal in Downloads
Make the AppImage executable
$ chmod +x cursor-0.42.3x86_64.AppImage
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.
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 theDownloads
folder itself.Now move the AppImage and Cursor AI icon to a different stable location
~/.local/bin
and we’ll create a folder inside this directory ascursor
.$ mkdir ~/.local/bin/cursor $ mv cursor-0.42.3x86_64.AppImage ~/.local/bin/cursor $ mv squashfs-root/cursor.png ~/.local/bin/cursor
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.
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
Give the cursor.desktop file executable permissions:
$ chmod +x ~/.local/share/applications/cursor.desktop
Now remove the
squashfs-root
directory fromDownloads
$ 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!