How to Use Linux Commands for Ubuntu Bash Shell on Windows 10?

0
291
How to Use Linux Commands for Ubuntu Bash Shell on Windows 10?

How to Use Linux Commands for Ubuntu Bash Shell on Windows 10? A shell script is a program written in a shell programming language (e.g., bash, csh, ksh or sh) that allows users to issue a single command to execute any combination of commands, including those with options and/or arguments, together with redirection. Shell scripts are well suited for automating simple tasks and creating custom-made filters.

A command is an instruction given by a user telling a computer to do something, such a run a single program or a group of linked programs. Commands are generally issued by typing them in at the command line (i.e., the all-text display mode) and then pressing the ENTER key, which passes them to the shell.

Prerequisites

  • Ubuntu Bash must be activated on your Windows 10
  • Make sure that you have already executed Universal Important Commands
  • Commands those compatible with Bash on Ubuntu on Windows (Links below)

How to install tool via Install Command?

First of all, we need an example, so I will choose htop (Interactive process-manager), so we simple put htop command in bash, like we do in Ubuntu

sudo apt-get install htop
How to install tool via Git Command?
How to install tool via Git Command?

If you want to know the real meaning of above command then read below table.

sudoIt is a command-line to get administration rights
apt-getIt is a command-line for working with APT software packages.
installIt is a command-line to install some tool or program
htopIt is a program for just example

As we put sudo command-line, so bash will ask for password. Type your password that you have set during installation of Bash on Ubuntu on Windows. The password will be stay invisible to don’t be freak out that nothing is coming up.

Now, to run the program, simple put program’s command-line. Such as:

htop
How to install tool via Git Command?
How to install tool via Git Command?

I am using htop just for example. Just your own <PROGRAME-NAME> instead of htop.

How to install tool via Git Command?

Initially, to clone any Git repository, we need to install git program in our system. It is really very simple to install git tool as it will install via install command. I already show you how to do it in above tutorial. So, just put below command to do it.

sudo apt-get install git

Make sure, installing Git tool is just a one time step. You do not need to install Git tool again and again for cloning every git repository.

Now, you need a Git repository to clone in your system and to install it. I will take airgeddon tool as an example. So to clone it, just put below command-line:

git clone https://github.com/v1s1t0r1sh3r3/airgeddon.git
How to install tool via Git Command?How to install tool via Git Command?
How to install tool via Git Command?

If you want to know the real meaning of above command then read below table.

gitIt is a command-line for git tool
cloneIt is a command-line for cloning repository
https://githu….on.gitA git repository, just for example

Now, to change directory to airgeddon, we need to put below command-line.

cd airgeddon

If you want to know the real meaning of above command then read below table.

cdIt is a command-line to change directory
airgeddonIt is a command-line for tool’s directory, just an example

Now, make sure, which is the real script in selected directory. If you are not sure than simple use ls command to list files, like for me its airgeddon.sh. To make this script executable, we need to put below command-line:

sudo chmod +x airgeddon.sh
How to install tool via Git Command?
How to install tool via Git Command?

If you want to know the real meaning of above command then read below table.

sudoIt is a command-line to get administration rights
chmod It is the command which may change the access permissions
+xIt is a command if tool located within the systems directory
airgeddon.shIt is command-line for tool, just an example

Finally, to run a script tool, just put below command

./airgeddon.sh
How to install tool via Git Command?
How to install tool via Git Command?

Or, use below if above isn’t working

sudo ./airgeddon.sh

Or, use below if above both aren’t working

sudo su ./airgeddon.sh

I am using airgeddon just for example. Just your own <PROGRAME-NAME> instead of airgeddon.

How to install tool if it’s in Zip?

Initially, to unzip any zip repository, we need to install unzip program in our system. It is really very simple to install this tool as it will install via install command. I already show you how to do it in above tutorial. So, just put below command to do it.

sudo apt-get install unzip

Now, you need a zip repository to clone in your system and to install it. I will take airgeddon tool again as an example. So to clone it, just put below command-line:

wget https://github.com/v1s1t0r1sh3r3/airgeddon/archive/master.zip
How to install tool if it's in Zip?
How to install tool if it’s in Zip?

If you want to know the real meaning of above command then read below table.

wgetIt is a command to retrieves content from web servers
…./master.zipAny content, just for example

Now, to unzip content, use below command.

unzip master.zip
How to install tool if it's in Zip?
How to install tool if it’s in Zip?

If you want to know the real meaning of above command then read below table.

unzipIt is a command-line to unzip content
master.zipIt is a file name to unzip

Now to locate your unzip folder simply use ls command, like for me it’s airgeddon-master. To change directory to airgeddon-master, we need to put below command-line.

cd airgeddon-master

If you want to know the real meaning of above command then read below table.

cdIt is a command-line to change directory
airgeddon-masterIt is a command-line for tool’s directory, just an example

Now, make sure, which is the real script in selected directory. If you are not sure than simple use ls command to list files, like for me its airgeddon.sh.

How to install tool if it's in Zip?
How to install tool if it’s in Zip?

To make this script executable, we need to put below command-line:

sudo chmod +x airgeddon.sh

If you want to know the real meaning of above command then read below table.

sudoIt is a command-line to get administration rights
chmod It is the command which may change the access permissions
+xIt is a command if tool located within the systems directory
airgeddon.shIt is command-line for tool, just an example

Finally, to run a script tool, just put below command

./airgeddon.sh

Or, use below if above isn’t working

sudo ./airgeddon.sh

Or, use below if above both aren’t working

sudo su ./airgeddon.sh

I am using airgeddon just for example. Just your own <PROGRAME-NAME> instead of airgeddon.

Please Like, Share and Comment your valuable thoughts.

Thanks for patronizing Ultimate Tech. This post is about, “How to Use Linux Commands for Ubuntu Bash Shell on Windows 10?“. I am sure your visit to us must be quite satisfying and in line with your expectations from us. Just in case, it’s not as you expected from us or if you are facing any problem, kindly forward your feedback’s directly to us by leaving a Comment below. And, get assured response from my side. Your feedback’s and suggestions are extremely valuable to us. This Post is written by the team of Ultimate Tech. There is not any source, if any, then already mentioned so Copying or using this post’s content for your own site is not allowed. If anyone do so, get ready for facing DMCA. Please, if you like this post then share on your social networking sites. Assuring you of our best service always.

Special Thanks

Leave a Reply

Be the First to Comment!

avatar
wpDiscuz