_partials/cli_tools.md
The locale is a mechanism allowing to customize programs to your language and country.
Let's verify that the default locale is set to English, please type this in the Ubuntu terminal:
locale
If the output does not contain LANG=en_US.UTF-8, run the following command in a Ubuntu terminal to install the english locale:
sudo locale-gen en_US.UTF-8
If after, you receive a warning (bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf-8)) in your terminal, please do the following:
Please, run this lines in your terminal.
sudo update-locale LANG=en_US.UTF8
sudo apt-get update
sudo apt-get install language-pack-en language-pack-en-base manpages
Instead of using the default bash shell, we will use zsh.
We will also use git, a command line software used for version control.
Let's install them, along with other useful tools:
sudo apt update
sudo apt install -y curl git imagemagick jq unzip vim zsh tree
These commands will ask for your password: type it in.
:warning: When you type your password, nothing will show up on the screen, that's normal. This is a security feature to mask not only your password as a whole but also its length. Just type in your password and when you're done, press Enter.
Let's now install GitHub official CLI (Command Line Interface). It's a software used to interact with your GitHub account via the command line.
In your terminal, copy-paste the following commands and type in your password if asked:
sudo apt remove -y gitsome # gh command can conflict with gitsome if already installed
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install -y gh
To check that gh has been successfully installed on your machine, you can run:
gh --version
:heavy_check_mark: If you see gh version X.Y.Z (YYYY-MM-DD), you're good to go :+1:
:x: Otherwise, please contact a teacher