Cursor AI is a modern AI-driven IDE that boosts productivity for developers. This guide demonstrates how to install Cursor on your Linux system using a one-liner command. The script will handle dependencies, download the Cursor AppImage, and create a convenient desktop launcher.
Ensure you have curl
installed on your system. If not, the script will install it for you.
Run the following command in your terminal to set up Cursor AI IDE:
sudo apt-get update && sudo apt-get install -y curl && echo '#!/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
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' > install_cursor.sh && chmod +x install_cursor.sh && ./install_cursor.sh
- Updates the system: Ensures your package list is up to date.
- Installs
curl
: If not already installed, it will be installed. - Creates the Script: Writes the installation script to
install_cursor.sh
. - Makes it Executable: Sets executable permissions on the script.
- Runs the Script: Executes the script to complete the installation.
After the script completes, you can find Cursor AI IDE in your applications menu. Click to open and start coding!
Enjoy the productivity boost with Cursor AI!