DEV Community

Cover image for How to Install Cursor the AI Editor on Linux Update 2024
Kamaal Abshir
Kamaal Abshir

Posted on • Edited on

How to Install Cursor the AI Editor on Linux Update 2024

Cursor is an AI-first code editor that can be downloaded on Windows, Mac, and Linux platforms and is intended for pair programming with AI, and it was created to assist developers in creating software more quickly and effectively.

I set up Cursor on my Mac and utilized it. It is simple to install on a Mac, but I found it to be extremely difficult to install on Ubuntu Linux.

However, after doing some research online, I was able to figure out how to install Ubuntu Linux. Here are the steps I took to get my computer's cursor to operate.

  • Step 1 Visit the Cursor website at https://cursor.so and click on the "Download" button.

cursro ai editor

  • Step 2 When the download is finished, a file with this extension .AppImage at the end will be in your download folder

Hold on, what is this ".AppImage" extension?

AppImage is a universal software package format that does not require the conventional installation method to be installed on Linux.

  • Step 3 Do not click it immediately! For the file to function properly, we must first make it executable. To make the file executable, go to the Downloads folder (or the place where you downloaded the Cursor software) and execute this command.
chmod +x cursor-0.42.4x86_64.AppImage
Enter fullscreen mode Exit fullscreen mode

cursor-0.42.4x86_64 is the name of the file i got from the Cursor website but yours may differ, Simply replace the name of your file to the command above, only replace after +x

Proceed to Step 4 if you run into a problem at this point, If you didn't encounter this error, you can skip the Step 4

./cursor-0.42.4x86_64.AppImage
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
Enter fullscreen mode Exit fullscreen mode

so what is going on ? what is this error ? Don't Panic !!

The error message indicates that the .AppImage requires FUSE to run, to fix this issue, and fuse it is a mechanism for Unix-like operating systems that allows non-privileged users to create their own file systems without editing kernel code.
This is achieved by running file system code in user space, while the FUSE kernel module provides only a "bridge" to the actual kernel interfaces.

  • Setp 4 install libfuse2
sudo apt-get install libfuse2
Enter fullscreen mode Exit fullscreen mode
  • Step 5 once you install the libfuse2 now run again this command
chmod +x cursor-0.42.4x86_64.AppImage
Enter fullscreen mode Exit fullscreen mode
  • Step 6 Great! You can now run the .AppImage file either by running the command from the terminal or by opening the Cursor file directly from your Downloads folder
./cursor-0.42.4x86_64.AppImage
Enter fullscreen mode Exit fullscreen mode

Follow these steps to add Cursor to your applications list

How to add cursor app on the installed application list

Follow these steps to add Cursor to your applications list

  • Move the app from the download to opt folder
sudo mv cursor-0.42.4x86_64.AppImage /opt/cursor.appimage
Enter fullscreen mode Exit fullscreen mode
  • Create a desktop entry for Cursor by running the command
sudo nano /usr/share/applications/cursor.desktop
Enter fullscreen mode Exit fullscreen mode
  • Past the follow in the file you've just created
[Desktop Entry]
Name=Cursor
Exec=/opt/cursor.appimage
Icon=/opt/cursor.png
Type=Application
Categories=Development;
Enter fullscreen mode Exit fullscreen mode
  1. save the file
ctl + x  
Enter fullscreen mode Exit fullscreen mode

then

press y 
Enter fullscreen mode Exit fullscreen mode

then

press enter
Enter fullscreen mode Exit fullscreen mode

As Final Step, we should add an icon to the app so you can tell it apart from other applications

Since we moved the app into the /opt directory, add a .png image into the /opt directory as well

The image file should be named cursor.png as defined when we created the desktop entry.

cusror is working and have custom icon

If you did all the steps and you application icon is not showing Log Out then login again

That is it thanks for reading :)

Top comments (40)

Collapse
 
johannesmichael profile image
johannesmichael

Since Ubuntu 22.04 the installation of Fuse can crash your system (as it did mine, Ubuntu 23). Just install libfuse2.
github.com/AppImage/AppImageKit/wi...

Collapse
 
mhbaando profile image
Kamaal Abshir

I've updated the article to reflect this correction & I apologize for any inconvenience caused.

Collapse
 
msaririzki profile image
rizki • Edited

How do you solve the problem after installing the fuse? I've already installed it and after I restarted my Ubuntu system it was damaged and information was like this : Oh no! Something went wrong. A problem occurred and the system could not recover. Please log out and try again.

Collapse
 
juliushuck profile image
Julius Huck

Check this out. The answer lists the packages that get removed when you install fuse: askubuntu.com/a/1409500

Collapse
 
stargazer10101 profile image
Nitish Itankar

Thanks. Wish I had seen this before crashing my Ubuntu system.

Collapse
 
mhbaando profile image
Kamaal Abshir

I've updated the article to reflect this correction & I apologize for any inconvenience caused.

Collapse
 
dontregret9 profile image
dontregret9

I just had to reinstall my Ubuntu 24.04 yesterday. Please pay attention to this comment before installing!

Collapse
 
mhbaando profile image
Kamaal Abshir

I've updated the article to reflect this correction & I apologize for any inconvenience caused.

Collapse
 
proflead profile image
Vladislav Guzey

There is an option without fuse proflead.dev/posts/cursor-ai-full-...

Collapse
 
meetshah8084 profile image
Meet Shah

thx for help

Collapse
 
lukas_marques_75fec65a06e profile image
Lukas Marques • Edited

@mhbaando Please add a warning to the post informing the installation of Fuse will break Ubuntu installs above 22.04. Too many people in the comments have had the problem (myself included) and nobody reads the comments before installing, so the post needs to be updated.

Collapse
 
mhbaando profile image
Kamaal Abshir

I've updated the article to reflect this correction & i apologize for any inconvenience caused.

Collapse
 
akbarsaputrait profile image
Akbar Anung Yudha Saputra

How to update to the latest Cursor?

Collapse
 
mhbaando profile image
Kamaal Abshir

you do the same steps just download the cursor, then move it the existing directory, you don't need t install the Fuse again since you already installed and keep on

Collapse
 
akbarsaputrait profile image
Akbar Anung Yudha Saputra

Hahaha you're right! I just move the newest AppImage to my existing app. Thanks!!

Collapse
 
daveragos profile image
Dawit Beyene

it working and thanks for that but the icon of the app isnt showing (its transparent)

Collapse
 
mhbaando profile image
Kamaal Abshir

the reason that the icon is not showing is you have to manually assign icon,
see this section on the "How to add cursor app on the installed application list"

Collapse
 
huykonofficial profile image
Huy Kon

Thank for saving my time

Collapse
 
mhbaando profile image
Kamaal Abshir

U welcome :)

Collapse
 
maketroli profile image
Marcelo

This is wrong. DO NOT INSTALL FUSE ON UBUNTU 24.04. I tried this guide and it caused my system to crash to a point where I had to reboot my computer from grub rescue. It heavily deleted extensions and important apps I had on my system.

Collapse
 
mhbaando profile image
Kamaal Abshir • Edited

You're correct, installing the fuse package on Ubuntu 24.04 can cause system instability,

I've updated the article to reflect this correction & I apologize for any inconvenience caused.

Collapse
 
celeron profile image
Khushal Bhardwaj • Edited

Image description

➜  Downloads ./cursor-0.43.6-build-241206z7j6me2e2-x86_64.AppImage 
[5678:1218/140559.345674:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_cursorp5hIOL/chrome-sandbox is owned by root and has mode 4755.
[1]    5678 trace trap (core dumped)  ./cursor-0.43.6-build-241206z7j6me2e2-x86_64.AppImage
Enter fullscreen mode Exit fullscreen mode

i got the error above how do i fix it??

Collapse
 
mhbaando profile image
Kamaal Abshir

The error indicates an issue with the sandboxing mechanism of the Cursor AppImage this can be resolved by ensuring proper permissions and ownership for the chrome-sandbox file,

Run the AppImage Without Sandboxing
./cursor-0.43.6-build-241206z7j6me2e2-x86_64.AppImage --no-sandbox

Or

Fix Permissions for the chrome-sandbox File To correctly configure the sandbox

Collapse
 
khushil_shah_9e34738a0207 profile image
KHUSHIL SHAH

i did all the steps but my cursor was not added to app list then i copied .desktop file and pasted to desktop folder and now i m able to see the cursor with the coreect icon but its not opening cursor app by clicking it
it made it executable and allowed for launching still i m not able to open cursor app by using .desktop file

Ubuntu 24.04
Image description
Image description

Collapse
 
clinteastwood profile image
Clint Eastwood

In order for the AppImage to run successfully, the --no-sandbox flag needs to be set. Thus, see below for what needs to be in your cursor.desktop:

[Desktop Entry]
Name=Cursor
Exec=/opt/cursor.appimage --no-sandbox
Icon=/opt/cursor.png
Type=Application
Categories=Development;

Collapse
 
khushil_shah_9e34738a0207 profile image
KHUSHIL SHAH

setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_cursorARFXWq/chrome-sandbox is owned by root and has mode 4755.

this is the error i m getting

Collapse
 
siegemt profile image
SiegeMT

If you put the AppImage in /opt make sure it's executable by all using ls -l /opt/cursor.AppImage and try right clicking on your desktop if you have a "create launcher" option then put the appimage path in the "command" section. If you cant the hit super and type "applications" and find New Item and add it that way. Sounds like you may be using an environment that you either needed to reload or does behind the scenes things rather than directly accessing it and it's trying to open as root which it has issues with doing.

Collapse
 
porchen_hund_f6741df13a0c profile image
Porchen Hund

For ubuntu24.04

./cursor-0.8.5.AppImage --no-sandbox

Collapse
 
ethan_cooper_6a77482a1e18 profile image
Ethan Cooper

Running ./cursor-0.8.5.AppImage --no-sandbox on Ubuntu 24.04 can crash your system, break your desktop, or cause security issues. Make sure you know the risks and have backups before trying it!

Collapse
 
shafin_hasnat profile image
Shafin Hasnat

To open cursor with cursor command-

echo "alias cursor='/opt/cursor.appimage" >> ~/.bashrc
source ~/.bashrc
Enter fullscreen mode Exit fullscreen mode