Many developers prefer to use Linux as their Operating System. This is not just a trend but Linux offers a lot of cool things over others. If you're thinking to switch, why don't you do it today?

We will try to understand how you can use Linux as your go-to OS. If you're using Mac, you can keep using it and you won't probably need to go for Linux. This is not a tutorial of what an Operating System is and which one is best rather it is about how you can use Linux for your programming needs.

Using Package Managers

If you're working on a Linux operating system a package manager is one of the most important pieces that you should be using. Do you want to install python?

# For Debian based (Debain, Ubuntu)
sudo apt install python3-dev

# For fedora
sudo dnf install python3-devel

However, you won't need to do this because almost every Linux OS comes with python preinstalled. You can install and update packages like Visual Studio Code, Teams, Slack, and what not just from your terminal!

Stop worrying much about your environment or path variables.

Don't worry much about it now if all of these things are new to you. It will get easier as you start working with Linux. Also, most of these things are taken care of automatically.

For most of the packages, the path is automatically setup for you. If there is still some problem with path and environment variables, you can easily set up by editing  ~/.bashrc or ~/.zshrc for bash and zsh terminal respectively.

export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$HOME/Workspace/flutter/installation/flutter/bin:$HOME/Android/Sdk/platform-tools:$HOME/Android/Sdk/tools:$PATH"
Example of PATH variable in your ~/.zshrc or ~/.bashrc file manually

You can use nano or vi editors from your terminal to edit files in the terminal itself.

Use command-line tools more than GUI

As a programmer, you can understand that building any graphical interface for software is time taking process. This can limit the rate at which simple programs can be coded. This is the reason why many cool tools are available as command-line tools. You can deploy your software with just one command and the possibilities are endless. Who will open any GUI for doing common tasks again and again?

Setup SSH and use it

SSH is a secure way to login into a remote server. You can also set it up for services such as You won't need any extra tool such as Putty (in Windows) to do this.

You can get a lot of tutorials on how to do this. The only thing to remember is, you need to create a pair of keys viz., public and private. To set up the connection you need to add your public key to the remote server once. If you set it up with a service such as GitHub, you won't need to tell the password again to perform some action.


Use inbuilt files program to connect with remote (FTP, SFTP, etc.) servers

If you are working with remote servers, this is one of the best things that Linux provides as an inbuilt tool. There might be multiple windows counterpart software for this but nothing comes close as you don't even need to pay anything for this tool.

If you want to login into a remote server, you can connect to it simply in the Files application under the "Connect Server" functionality.

# For the remote servers where ssh is setup,
# add the following line in to connect
# username - remote server username
# ipaddress - remote server ip address


# If you have already set up the 
# username, password, host, etc. in config
# You can directly do something like

Connect to a remote server to access files in Linux

Connect to cloud servers (GPUs, CPUs, etc.) but use Jupyter Lab/Notebook locally

Suppose you're connected to a cloud GPU of AWS, GCP, Azure, etc. and now you want to modify your AI/ML code.

What should you do now?

Are you planning to something like:

  1. Modify your code locally
  2. Push the code to Github
  3. Pull the code to the server
  4. Run the code

Don't do this for AI/ML code!

Recommended is:

  1. Start a Jupyter notebook/lab on a remote server
  2. Create an ssh tunnel between your local machine and the remote GPU
  3. Open Jupyter notebook/lab locally
  4. Modify and run the code locally but it will be executed on the remote server!

Example to create ssh tunnel:

ssh -NfL localhost:8888:localhost:8888 username@ipaddress

You can follow for a proper tutorial.

  1. Visual Studio Code
  2. Jupyter Notebook/Lab
  3. Android Studio

Dual Boot

You can easily dual boot your windows system with Linux OS such as Ubuntu and Fedora. You will find many tutorials to do this. If you have some specific work with Windows, you can opt for dual boot otherwise just simply install Linux standalone.

If you have any suggestions to add to the above list, let me know in our AI Champ Forum!

Community for Data Science and AI Enthusiasts, Practitioner and Beginners