This project provides scripts to install Cursor IDE on Linux with automatic updates that integrate seamlessly with your system's package manager.
# Clone or download this repository
git clone <repository-url>
cd cursor-ide-setup
# Run the installer (requires sudo)
sudo ./install-cursor.shTo check for Cursor updates:
sudo apt updateTo upgrade Cursor (if an update is available):
sudo update-cursorNote:
sudo apt upgradedoes NOT upgrade Cursor automatically. You must runsudo update-cursorto perform the upgrade.
Verify everything works:
./test-installation.sh| Component | Location | Purpose |
|---|---|---|
| Cursor IDE | /usr/local/bin/cursor |
The main application binary (AppImage) |
| Updater Script | /usr/local/bin/update-cursor |
Downloads and installs updates |
| Check Script | /usr/local/bin/check-cursor-update |
Checks for updates without downloading |
| Desktop Entry | /usr/share/applications/cursor.desktop |
Makes Cursor appear in your app menu |
| APT Hook | /etc/apt/apt.conf.d/99-cursor-update |
Triggers check after apt update |
| Version File | /usr/local/share/cursor-ai/version.txt |
Tracks the installed version |
| Icon File | /usr/local/share/cursor-ai/cursor.png |
Application icon for desktop entry |
| System Config | /etc/sysctl.d/60-cursor-unprivileged-userns.conf |
Kernel config (created only if needed) |
- One-time setup: Install once, then check for updates and upgrade as needed
- Native feel: Updates integrate with your system's package manager
- Safe updates: Backup previous version during update
- Launch issue detection: Automatically fixes common AppImage startup problems
- Clean installation: Follows Linux filesystem standards
- Easy removal: Complete uninstall script provided
- Debug support: Comprehensive debugging tools included
sudo ./install-cursor.shThe installer will:
- Check and install dependencies (
wget,curl,jq) - Download the latest Cursor IDE from Cursor's official API
- Set up the application in
/usr/local/share/cursor-ai/and/usr/local/bin/ - Create a desktop entry for your app menu
- Detect and fix common launch issues (FUSE library, sandbox errors)
- Install the auto-updater system
- Launch Cursor: Open your application menu and search for "Cursor"
- Check for updates:
sudo apt update - Upgrade Cursor:
sudo update-cursor
sudo ./uninstall-cursor.sh# Install
sudo make install
# Test
make test
# Uninstall
sudo make uninstall
# See all options
make help- Dependencies: Ensures
wget,curl, andjqare installed - Download: Fetches the latest Cursor AppImage from Cursor's official API
- Setup: Places files in standard Linux locations
- Launch Issues: Detects and fixes common AppImage startup problems (FUSE, sandbox)
- Integration: Creates desktop entry and APT hook
- Check:
sudo apt updatequeries Cursor's API for the latest version - Compare: Compares with locally installed version
- Notify: Displays update availability message
- Update:
sudo update-cursordownloads and installs new version if available - Backup: Keeps backup of previous version during update
/usr/local/share/cursor-ai/
βββ cursor.png # Application icon
βββ version.txt # Version tracking file
/usr/local/bin/
βββ cursor # Main application binary (AppImage)
βββ version.txt # Current version info
/usr/local/bin/
βββ update-cursor # Update script
βββ check-cursor-update # Check for updates script
/usr/share/applications/
βββ cursor.desktop # Desktop entry
/etc/apt/apt.conf.d/
βββ 99-cursor-update # APT hook configuration
/etc/sysctl.d/
βββ 60-cursor-unprivileged-userns.conf # Kernel config (created only if needed)
If you encounter problems during installation, use the debug script:
sudo ./debug-install.shThis will test:
- Network connectivity to Cursor's servers
- API endpoint accessibility
- Download URL validation
- Architecture detection
- Dependencies availability
"Command not found: jq"
sudo apt update && sudo apt install jqCursor won't start (FUSE error)
# Install FUSE library
sudo apt update && sudo apt install libfuse2Cursor won't start (sandbox error)
# Check if --no-sandbox flag was added to desktop entry
grep "no-sandbox" /usr/share/applications/cursor.desktop
# If not present, the installer should have detected this automatically
# Try reinstalling: sudo ./install-cursor.shUpdates not working
# Check if the updater script exists and is executable
ls -la /usr/local/bin/update-cursor
# Test the updater manually
sudo update-cursorCursor not appearing in app menu
# Refresh the desktop database
sudo update-desktop-databasePermission errors
# Ensure scripts are run with sudo
sudo ./install-cursor.sh# Check installed version
cat /usr/local/share/cursor-ai/version.txt
# Check for updates (without downloading)
sudo check-cursor-update
# Check latest available version from API
curl -s "https://cursor.com/api/download?platform=linux-x64&releaseTrack=stable" | jq -r '.version'The updater provides colored output during system updates:
- π΅ Blue: Status messages
- π’ Green: Success messages
- π‘ Yellow: Warnings
- π΄ Red: Errors
The project includes a config.conf file with default settings that can be customized:
# View current configuration
cat config.conf
# Key settings you can modify:
# - CURSOR_INSTALL_DIR: Installation directory
# - DOWNLOAD_TIMEOUT: Download timeout in seconds
# - AUTO_UPDATE_ENABLED: Enable/disable auto-updates
# - USE_COLORS: Enable/disable colored outputsudo rm /etc/apt/apt.conf.d/99-cursor-updatesudo ./install-cursor.sh # Will recreate the APT hookEdit the CURSOR_DIR variable in install-cursor.sh before running:
# Change these lines in install-cursor.sh
CURSOR_DIR="/your/custom/data/path"
CURSOR_BINARY="/your/custom/bin/path/cursor"Or modify the config.conf file:
CURSOR_INSTALL_DIR="/your/custom/data/path"cursor-ide-setup/
βββ install-cursor.sh # Main installer script
βββ uninstall-cursor.sh # Complete removal script
βββ test-installation.sh # Installation validation
βββ debug-install.sh # Debug and troubleshooting
βββ config.conf # Configuration settings
βββ Makefile # Build automation
βββ README.md # This documentation
βββ CHANGELOG.md # Version history
βββ ISSUES.md # Known issues and solutions
Feel free to submit issues and enhancement requests!
To modify the scripts:
- Edit the appropriate script file
- Test in a virtual environment
- Ensure proper error handling
- Update this README if needed
This project is open source. Use at your own risk.
- Cursor team for creating an amazing AI-powered code editor
- Linux community for filesystem standards and best practices