Skip to content

Instantly share code, notes, and snippets.

@evgenyneu
Last active April 29, 2025 10:48
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'
@blakete
Copy link

blakete commented Apr 16, 2025

Thanks! This worked smoothly for me on Ubuntu 22.04.5

@NoviaDroid
Copy link

NoviaDroid commented Apr 20, 2025

the online cursor icon to download should be replaced as : https://www.cursor.com/apple-touch-icon.png

@Hassan-Mehmood
Copy link

The link in the script is not working for some reason. Anyone else facing the same issue?
NOT WORKING: https://downloader.cursor.sh/linux/appImage/x64

@melroy89
Copy link

Cursor now really really need to just publish a Debian repo sooner than later.

@Sayeh-1337
Copy link

Sayeh-1337 commented Apr 22, 2025

Simply do that

./Cursor-xxxxxx.AppImage --appimage-extract cursor

# Navigate to the source directory
cd cursor/usr

# Copy the contents to the system /usr directory
sudo cp -r bin/* /usr/bin/
sudo cp -r lib/* /usr/lib/
sudo cp -r share/* /usr/share/

# Set the correct ownership and permissions for the Chrome sandbox
sudo chown root:root /usr/share/cursor/chrome-sandbox
sudo chmod 4755 /usr/share/cursor/chrome-sandbox

@melroy89
Copy link

melroy89 commented Apr 22, 2025

Just saying.. In my case --appimage-extract doesn't accept the parameter for a directory (cursor in this case). Without cursor extracting works as expected into squashfs-root dir. Thanks!

Improved script from above snippet (for Linux): https://gitlab.melroy.org/-/snippets/621

That being said, it's still NOT ideal.. since normally the executable (eg. vscode or windsurf) goes to background when executing it. My code snippet fixing this again, by using a custom launcher script just like vscode. Basically doing:

ELECTRON="/usr/local/share/cursor/cursor"
CLI="/usr/local/share/cursor/resources/app/out/cli.js"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"

Cursor fix your deb files!

So now the only down-side is that an icon is missing Cursor fixed that issue apparently.

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