Skip to main content
  1. Posts/

Install code editor on Linux

·274 words·2 mins
VsCode AndroidStudio CodeEditor Linux Multiplatform
Nofal Briansah
Author
Nofal Briansah
Holaaa :)

TL;DR
#

A code editor is a program that developers use to write and manage code more efficiently.


Install Code Editor
#

Here’s how to install two popular code editors on Linux: Visual Studio Code and Android Studio.

Visual Studio Code (vscode)
#

Visual Studio Code, created by Microsoft in 2015, has become a mainstream code editor supporting multiple programming languages and a wide variety of extensions.

  • Debian based (Debian, Ubuntu, … etc)
  1. Download VSCode from Visual Studio in .deb format

  2. Navigate to the folder where the file is saved

  3. Install VSCode (adjust the file name as needed):

    sudo apt install code_1.96.2-1734607745_amd64.deb
    
  • RHEL based (RedHat, Fedora, … etc)
  1. Download VSCode from Visual Studio in .rpm format. Follow the prompt to add the repository.

  2. Add the VSCode repository:

    sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
    echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null
    
  3. Install vscode:

    sudo dnf update
    sudo dnf install code # or code-insiders
    

Android Studio
#

Android Studio is the official Integrated Development Environment (IDE) for Android app development, created by Google in 2013.

  1. Check if Java is installed:

    java --version
    

    Check Java version

  2. If Java is not installed, install it as follows:

  • Debian based (Debian, Ubuntu, … etc)

    sudo apt install openjdk-21-jdk openjdk-21-jre
    
  • RHEL based (RedHat, Fedora, … etc)

      sudo dnf install java-21-openjdk-headless
    
  1. Download Android Studio from Android Studio. Download the .tar.gz file and navigate to the download folder.

  2. Extract the downloaded file:

    tar xvf android-studio-2024.2.1.12-linux.tar.gz
    
  3. Move the extracted folder android-studio to /opt:

    sudo mv android-studio /opt
    
  4. Launch Android Studio and follow the setup wizard. next, next, …

    /opt/android-studio/bin/./studio
    
  5. Create a desktop shortcut to avoid launching from the terminal

    create shortcut


References
#