How To Install VS Code On Kali Linux – Hello guys in this tutorial I am going to show you How To Install VS Code On Kali Linux / Ubuntu. Many people ask me about the installation of VS code on Kali Linux or the Ubuntu operating system.
So I am back with a new tutorial here. So in this guide, we will learn How To Install VS Code On Kali Linux / Ubuntu. As well as we will fix some issues like VS code not opening in kali Linux or Ubuntu.
So if you are intrusted to install vs code on your Linux orating system. Then you are in the right place.
What is vs code (visual studio code) :
OK so let’s start the guide. First, a fall let’s Learn what is vs code.
Visual Studio Code, also commonly referred to as VS Code is a source-code editor made by Microsoft with the Electron Framework, for Windows, Linux, and macOS.
Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. Users can change the theme, keyboard shortcuts, and preferences, and install extensions that add additional functionality.
How To Install VS Code On Kali Linux / Ubuntu | Fix VS Code Not Opening Problem
OK, now I hope you understand what is vs code or visual studio code. Now let’s install that in our kali Linux or Ubuntu operating system.
How To Install VS Code On Kali Linux / Ubuntu
Right now I am using kali Linux on an android phone. But all the steps are the same if you are using a desktop, laptop, and VPS. But make sure you are using kali Linux or Ubuntu operating system.
(1) Open your terminal emulator first. Then follow my below commands to install VS code in kali Linux or Ubuntu.
# Use this to update and upgrade all packages.
sudo apt update && apt upgrade -y
(2) Now it will take some time to update your packages. So wait until it’s complete.
After that just install one more package which is helpful for us.
# Install the wget package.
sudo apt install wget -y
(3) After the above step. Wget the package installed on your system. Now we are going to download vs code config file using the below command.
wget https://gitlab.com/MaheshTechnicals/kali-nethunter-2022/-/raw/main/vscode
(4) after the above command it will download vs code file we need to execute that file to install vs code on Kali Linux or Ubuntu operating system.
To run that file use the below command.
bash vscode
With this command, your operating system will start configuring and downloading vs code software on your Linux or Ubuntu operating system.
it will take some time to install vs code editor on your Linux machine so please wait until the process is complete.
Read More :
- How To Install Node JS On Android Phone With VS Code Editor
- How to Install PyCharm on Android Phone
- How To Install Ubuntu 24.04 On Android Without Root
- How To Download Google Drive File Via Linux Terminal
- How To Install Kali Linux On Android No Root 2024
(5) now after some processing vs code software will be successfully installed on your system to check that just check your application list or you can use the search bar to search vs code application.
(6) this way with one click you can install vS code on your Linux and Ubuntu operating systems.
NOTE: we successfully installed vs code on Linux or Ubuntu operating system but sometimes you will face some issues like vs code not opening.
So you need to fix that issue as well then you can use your score without any problem.
How To Fix VS Code Not Opening Problem :
Maybe after installation of vs code, you will face an issue which is vs code not opening on your system so let’s fix this issue.
(1) open a terminal emulator on your Kali Linux or Ubuntu operating system.
(2) now we need to modify one file to fix that issue. Suggest opening that file using the below command.
sudo nano /usr/bin/code
(3) above command will open a file called code. Just scroll down to the bottom of that file until you get $@ in your terminal.
Now just give space and paste this line –no-sandbox like the below image.
(4) Now scroll up until you get the if woot ensure line. You need to comment out these lines using #. If you did not understand then see the below image.
(5) After all the changes. Now save the file using CTRL +o Enter then CTRL +x.
Now your file is successfully saved.
(6) Now just type the code
in the terminal. Boom your vs code will open successfully.
(7) now you can open vs code using the command line. But you will still not be able to open vs code using the graphical icon. So to fix that you need to edit launcher settings.
(8) Search vs code then add that software to the desktop. Then just right-click on it.
(9) Then select edit Launcher. You will see some settings here. Now remove all commands which are written in the command text box. Then add code here like the below image.
That’s it just save it and divulge click on vs code icon. Now it will open successfully.
How To Fix Browser Not Opening With Live Server VS Code Extension :
If you are using vs code then you should use the live server extension on it. But in some cases when you start your life server your browser will not open automatically. So to fix that issue just follow the below steps.
(1) open vs code editor. Go to the extension tab. Install live-server extension.
(2) after installation you will see the settings icon here just click on it then click on Extension settings.
(3) here you will get all the settings of the live server extension.
(4) you need to set the default web browser for your live server extension.
To do that just find a custom browser option in that settings. Here you need to select your favorite Browser.
I am going to select the firefox browser here.
That’s it. Close the settings tab now. Now run the live server again and boom now your browser will open successfully with the output of your code.
Done this way you can Fix VS Code Not Opening Problem on kali Linux or Ubuntu operating system.
Youtube Video Tutorial :
Method – 2: Install VS Code
The above method still works, but now it has become more complicated for beginners. That’s why I am going to give you simple steps to achieve all tasks very easily. So are you ready to install VS Code on Ubuntu/Kali Linux on Android? Let’s install it.
1. First, make sure you have Kali Linux, Ubuntu, or any other Linux distribution installed on your Android device using Termux. If not, follow the appropriate guide to install it.
2. Now, log in to your distro. If you are using Kali NetHunter (Kali Linux), log in to your distro using the following command:
nh -r
If you are using Ubuntu, log in to your distro using this command:
ubuntu
3. Before installing VS Code, update all packages in your distro using this command:
sudo apt update
4. Now, we need to download the VS Code installer script. For that, we are going to use the wget
package. First, install wget
in your Linux distro using this command:
sudo apt install wget -y
5. Download the VS Code installer script file into your Linux distro using the wget
package with this command:
wget https://gitlab.com/MaheshTechnicals/kali-nethunter-2022/-/raw/main/vscode
6. Grant all executable permissions to that file to run it properly using this command:
chmod +x vscode
7. Now, run the script using this command:
sudo bash vscode
After running the script, you will see an option to install or uninstall. Select 1 to install VS Code and press Enter.
8. The script will automatically download and install the latest version of VS Code on your Linux distro.
9. After successful installation, you will see a confirmation message. This means VS Code is now installed successfully.
10. VS Code is installed successfully in your Linux distro. But if you try to open the VS Code application from your apps menu, it will not open. Let’s fix that issue.
11. Go to your Linux distro terminal again. Open this file and modify one line properly. Just follow this command to open the file:
nano /usr/share/applications/code.desktop
Find this line in that file:
Exec=/usr/share/code/code %F
Replace the whole line with this:
Exec=/usr/share/code/code --no-sandbox %F
12. Save the file using CTRL + X
, then press Y
and Enter. Now go and launch VS Code from the apps menu; it will work now.
13. To fix the browser not opening issue in VS Code, go to Settings > Default Applications and set a default browser like Firefox. That’s it. Now, the browser will also open if you are using VS Code extensions like Live Server.
That’s it. This way, you can easily install VS Code on your Android device using Termux.
Conclusion :
Thank you so much for reading this article with this article you can solve How To Install VS Code On Kali Linux / Ubuntu question and we also Fixed VS Code Not Opening Problem.
If you have any questions in your mind then you can ask me in the comment section. And if you like this article then please share this article with your friends and family.
Thank you.
hello guys my Mi Max2 with RedWolf Recovery and pixel experience 9.0 custom rom won’t boot to system. any input to fix this ?
Use latest orangfox recovery. Then wipe all except internal & SD card. Then flash your ROM then format data. Reboot