Skip to content

Instantly share code, notes, and snippets.

@evgenyneu
Last active December 27, 2024 23:54
Show Gist options
  • Save evgenyneu/5c5c37ca68886bf1bea38026f60603b6 to your computer and use it in GitHub Desktop.
Save evgenyneu/5c5c37ca68886bf1bea38026f60603b6 to your computer and use it in GitHub Desktop.
Install Cursor AI code editor on Ubuntu 24.04 LTS

Install Cursor AI editor on Ubuntu 24.04

  1. Use the Download button on www.cursor.com web site. It will download the NAME.AppImage file.

  2. Copy the .AppImage file to your Applications directory

cd ~/Downloads
mkdir -p ~/Applications
mv NAME.AppImage ~/Applications/cursor.AppImage
  1. Install libfuse2
sudo apt update
sudo apt install libfuse2
  1. Make it an executable
chmod +x ~/Applications/cursor.AppImage
  1. Run
~/Applications/cursor.AppImage --no-sandbox
  1. Add cursor shortcut

Add to .bashrc or .zshrc

alias cursor='~/Applications/your-app.AppImage --no-sandbox'
@sradforth
Copy link

sradforth commented Nov 19, 2024

Thanks for sharing this, might be worth adding...

If you want a shortcut on your taskbar like any normal application, add this file

In terminal type

$ nano ~/.local/share/applications/cursor.desktop

Then add the link to your application. You will need the cursor.png icon file you can either extract from the AppImage or take a snapshot of it.

Would love the cursor team to sort this out though. It's unnecessarily difficult to install/update on ubuntu plus rather unsafe with the --no-sandbox flag that is recently needed.

[Desktop Entry]
Name=cursor
Exec=/home/HOMEDIRHERE/Apps/your-app.AppImage --no-sandbox
Icon=/home/HOMEDIRHERE/.local/share/icons/cursor.png
Type=Application
Terminal=false

@verystrongjoe
Copy link

Is it working for Ubuntu 22.04?

@evgenyneu
Copy link
Author

@verystrongjoe should work on any version

@ki11e6
Copy link

ki11e6 commented Dec 21, 2024

works great. If anyone need script use following (i copied from another guy in comminity)

`
#!/bin/bash

installCursor() {
if ! [ -f /opt/cursor.appimage ]; then
echo "Installing Cursor AI IDE..."

    # URLs for Cursor AppImage and Icon
    CURSOR_URL="https://downloader.cursor.sh/linux/appImage/x64"
    ICON_URL="https://raw.githubusercontent.com/rahuljangirwork/copmany-logos/refs/heads/main/cursor.png"

    # Paths for installation
    APPIMAGE_PATH="/opt/cursor.appimage"
    ICON_PATH="/opt/cursor.png"
    DESKTOP_ENTRY_PATH="/usr/share/applications/cursor.desktop"

    # Install curl if not installed
    if ! command -v curl &> /dev/null; then
        echo "curl is not installed. Installing..."
        sudo apt-get update
        sudo apt-get install -y curl
    fi

    # Download Cursor AppImage
    echo "Downloading Cursor AppImage..."
    sudo curl -L $CURSOR_URL -o $APPIMAGE_PATH
    sudo chmod +x $APPIMAGE_PATH

    # Download Cursor icon
    echo "Downloading Cursor icon..."
    sudo curl -L $ICON_URL -o $ICON_PATH

    # Create a .desktop entry for Cursor
    echo "Creating .desktop entry for Cursor..."
    sudo bash -c "cat > $DESKTOP_ENTRY_PATH" <<EOL

[Desktop Entry]
Name=Cursor AI IDE
Exec=$APPIMAGE_PATH --no-sandbox
Icon=$ICON_PATH
Type=Application
Categories=Development;
EOL

    echo "Cursor AI IDE installation complete. You can find it in your application menu."
else
    echo "Cursor AI IDE is already installed."
fi

}

installCursor

`
run the script by giving chmod +x ./install_script.sh and run ./install_script.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment