VScode is one of the best code editors with lots of add-on packages. Although you can install VScode in linux and use X windows to edit in linux, most people run VScode in Windows and would like to edit Linux files from Windows within VScode. There is a simple way to do this using the Mobax terminal https://mobaxterm.mobatek.net/ .

First download ad install Mobaxterm and make sure you can login to linux using ssh with Mobax terminal.

Once logged in to ssh terminal on the left it will show a directory of your files in home directory. Right click on any file and click Open With->Select Visual Studio Code (make sure you had already installed VScode in windows).

The linux file will open in VScode editor. Now if you make any change and save the file in VScode it will pop-up a Mobax prompt asking if you would like to save the file to remote server. Click yes and the changed file is saved in linux. So it feels like you are working directly in Linux.

You can even run Python code in VScode in the linux file. Just right-click on the File in VScode and click Open in Terminal. It will open a terminal session in VScode and the file will be in a directory and you can run it with python in windows. So now you can use python editor as well:

PS C:\Users\userid\Documents\MobaXterm\slash\RemoteFiles\135498_12_1> python mypythonscript.py

Recent posts

Upgrade Git in Centos 7 Copy HDFS file to Azure Synapse ADLS2 using Nifi Install Microsoft ODBC driver for SQL Server (Linux) SQLAlchemy query AWS Redshift database with python Bash script to create kerberos users Hive 3 ACID tables creation using ORC format Migrating Streamsets SDC to Apache Nifi Install steps Connect SQLalchemy to Cloudera Impala or Hive Is Apache Impala 65 to 200 times faster than Apache Hive on Tez Java Hive JDBC using Kerberos authentication example script