Do you have a Windows 10 on your PC and want to use a Unix shell/ bash/ Linux for bioinformatics work? It’s possible. You can run Linux alongside Windows 10 without the need for a second device or Virtual machine using the Windows subsystem for linux.
Linux Introduction
Linux is a free Operating system (open source project) just like paid Mac (Apple) and Windows (Microsoft). If one has Windows already installed, You can install Linux alongside it.
Humans and computers commonly interact in many different ways, such as through a keyboard and mouse, touch screen interfaces, or using speech recognition systems. The most widely used way to interact with personal computers is called a graphical user interface (GUI). With a GUI, we give instructions by clicking a mouse and using menu-driven interactions.
While the visual aid of a GUI makes it intuitive to learn, this way of delivering instructions to a computer scales very poorly. Imagine the following task: for a literature search, you have to copy the third line of one thousand text files in one thousand different directories and paste it into a single file. Using a GUI, you would not only be clicking at your desk for several hours, but you could potentially also commit an error in the process of completing this repetitive task. This is where we take advantage of the Unix shell. The Unix shell is both a command-line interface (CLI) and a scripting language, allowing such repetitive tasks to be done automatically and fast. With the proper commands, the shell can repeat tasks with or without some modification as many times as we want. Using the shell, the task in the literature example can be accomplished in seconds.
The Shell
The shell is a program where users can type commands. With the shell, it’s possible to invoke complicated programs like climate modeling software or simple commands that create an empty directory with only one line of code. The most popular Unix shell is Bash (the Bourne Again SHell — so-called because it’s derived from a shell written by Stephen Bourne). Bash is the default shell on most modern implementations of Unix and in most packages that provide Unix-like tools for Windows.
Using the shell will take some effort and some time to learn. While a GUI presents you with choices to select, CLI choices are not automatically presented to you, so you must learn a few commands like new vocabulary in a language you’re studying. However, unlike a spoken language, a small number of “words” (i.e. commands) gets you a long way, and we’ll cover those essential few today.
The grammar of a shell allows you to combine existing tools into powerful pipelines and handle large volumes of data automatically. Sequences of commands can be written into a script, improving the reproducibility of workflows.
In addition, the command line is often the easiest way to interact with remote machines and supercomputers. Familiarity with the shell is nearly essential to run a variety of specialized tools and resources including high-performance computing systems. As clusters and cloud computing systems become more popular for scientific data crunching, being able to interact with the shell is becoming a necessary skill. We can build on the command-line skills covered here to tackle a wide range of scientific questions and computational challenges.
Installing Linux
You can install Linux using any distributor such as Ubuntu which is what I used. Apart from downloading the OS from the internet, You can always download the Ubuntu app from the Microsoft App Store in you PC.
Once downloading, You have to turn on the Windows subsystem for Linux optional component. This is how to set it up.
- Open settings
- Click on Apps
- Under the related settings
- Click the programs & Features on or off option from the left pane.
- Check the windows subsystem for linux option
- Click the OK button.
- This will prompt you to Restart
Once it restarts, Go ahead and open the app or launch it from the app store.
Once it’s done installing, you will be prompted to add a New Unix Username. It should be in small letters and use _ to separate between words. Once entered, press enter.
Once accepted, you will be prompted to write your password and press enter. The thing with Linux, You cannot see any indication of typing so you have to remember the sequence of what you are writing and where you are.
You will recieve a prompt to re-enter the password and you press enter. If its the same, This will be confirmed and one will wait for complete installation.
Wait until you get your Linuxusername@Computerusername:~$
Your Linux will be ready to use.
When you close and open again, You will be prompted to the dollar sign – normally referred to as Prompt – where you will write your commands after that.
Next: Why Learn Unix/Shell/Bash/Linux for Bioinformatics?