Skip to content

Instantly share code, notes, and snippets.

@mhtamun
Last active May 26, 2025 17:52
Show Gist options
  • Save mhtamun/ea5c2a0cd5b343eed04109eeebc096ac to your computer and use it in GitHub Desktop.
Save mhtamun/ea5c2a0cd5b343eed04109eeebc096ac to your computer and use it in GitHub Desktop.
Install Cursor AI on Ubuntu 24.04
Open a terminal
Paste the full script above or save it to a file:
nano install-cursor.sh
Make the script executable:
chmod +x install-cursor.sh
Run it:
./install-cursor.sh
#!/bin/bash
# Cursor AI Installation Script for Ubuntu
# Tested on Ubuntu 24.04 LTS
echo "πŸ“¦ Updating packages and installing libfuse2..."
sudo apt update && sudo apt install -y libfuse2
# Define variables
APPIMAGE_NAME="Cursor.AppImage"
DOWNLOAD_URL="https://downloads.cursor.com/production/96e5b01ca25f8fbd4c4c10bc69b15f6228c80771/linux/x64/Cursor-0.50.5-x86_64.AppImage"
INSTALL_DIR="$HOME/Applications"
APPIMAGE_PATH="$INSTALL_DIR/$APPIMAGE_NAME"
DESKTOP_FILE="$HOME/.local/share/applications/cursor.desktop"
echo "πŸ“₯ Downloading Cursor AppImage..."
mkdir -p "$INSTALL_DIR"
curl -L "$DOWNLOAD_URL" -o "$APPIMAGE_PATH"
echo "πŸ” Making AppImage executable..."
chmod +x "$APPIMAGE_PATH"
echo "πŸš€ Running Cursor to verify..."
"$APPIMAGE_PATH" --no-sandbox &
read -p "Press Enter to continue with optional desktop and alias setup..."
echo "πŸ“‚ Creating .desktop file for application menu..."
cat > "$DESKTOP_FILE" <<EOF
[Desktop Entry]
Name=Cursor
Exec=$APPIMAGE_PATH --no-sandbox
Icon=code
Type=Application
Categories=Development;IDE;
EOF
chmod +x "$DESKTOP_FILE"
echo "πŸ”— Adding terminal alias 'cursor' to ~/.bashrc..."
echo "alias cursor='$APPIMAGE_PATH --no-sandbox'" >> ~/.bashrc
source ~/.bashrc
echo "βœ… Done! You can now launch Cursor by:"
echo " - Typing 'cursor' in terminal"
echo " - Searching 'Cursor' in your application menu"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment