How to clone repository from GitHub in Mabox Linux

Written by Administrator on Sunday April 5, 2020

First of all, let's check, if git application is installed:

$ git --version

Yep, we have git, let's clone repository from GitHub:

Creating directory for repositories

Now, let's create a folder for out repositories. If you are new to Linux, you have to know, in which folder you are now, so run following command:

$ pwd

For example, in my system I get reponse:

/home/dima

This is my home directory. So, I have two ways to create my repository folder:

If I know I'm now in /home/dima, I run run command:

$ mkdir repos

If I don't know, where am I now, I run a command with absolute path:

$ mkdir /home/dima/repos

Result will be the same. Directory repos is created in /home/dima

For our purpose I've chosen repository for program hashcat-utils, which GitHub's address is https://github.com/hashcat/hashcat-utils.

Cloning repository from GitHub

let's to go our folder for repos:

$ cd /home/dima/repos

And run a command:

$ git clone https://github.com/hashcat/hashcat-utils

Repository is copied. Just for sure I ran this command:

$ ls /home/dima/repos

To ensure, that repository was cloned to defined folder.