How to install Cursor the AI- editor on linux
Published: 2023-11-21 08:38:59

Cursor is an AI-first code editor designed for pair-programming with AI, it is available for download on Linux, Mac, and Windows platforms. 
Cursor is built to help developers build software faster and more efficiently.

I installed cursor and used it on my mac it's straight forward how to installed it on mac, but when i tried to install it on Linux Ubuntu it's quite challenging.

how ever after doing some research on the internet i figured it out how to install on Ubuntu Linux here is the steps i did to have cursor working on my machine.

1. Visit the Cursor website at [https://cursor.so](https://www.cursor.so/) and click on the "Download for Linux" button.


![cursor download button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1d7l8y571qck1z61p1ad.png)
 

2. Once the download is complete, in your download folder you will have a file that ends with this extension .Appimage 

wait what the heck is this extension ".Appimage" 

> AppImage is a universal software package format that can be installed on Linux without going through the traditional way of installation

3. Don't click right away, we have to make the file executable, so it can run nicely and smoothly, navigate the Download folder or where you downloaded the cursor app and run this command to make the file executable 

```shell
chmod +x cursor-0.8.5.AppImage
```

> cursor-0.8.5.AppImage is the file i downloaded from the cursor website yours maybe variant just replace after +x to your file name.

okay, now you have encouter this error, if you don't see any error you can skip **step 4**

```shell
./cursor-0.8.5.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
```
 
so what the heck is going on ?

> 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.

4. install fuse 

```
sudo apt-get install fuse
```

5. once you install the fuse now run again this command 

```shell
chmod +x cursor-0.8.5.AppImage
```
6. nice one more step now you can run .Appimage by typing or by double clicking the cursor file on your download folder

```shell
./cursor-0.8.5.AppImage
```

you can run any time that you need by double clicking the app in your download folder or on your terminal.


## How to add cursor app on the installed application list 

each time you need to run cursor you have to go download folder and run it from there

so you follow these steps to add the cursor on application list 

1. move the app from the download to opt folder

```
sudo mv cursor-0.8.5.AppImage /opt/cursor.appimage
```
2. Create a desktop entry for Cursor by running the command

```
sudo nano /usr/share/applications/cursor.desktop
```
3. 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;
```

4. save the file 

```
ctl + x  
```
then 
```
press y 
```
then 
```
press enter
```

one last step we have to add any icon you like, to the app so you can differentiate it from other apps since we move the app to opt direcotry, 

add .png image to the opt file that is named `cursor.png`


that is it thanks for reading