Quantcast
Channel: Sameer Shaik. B.E,M.S,M.B.A,P.M.P,C.S.M
Viewing all articles
Browse latest Browse all 191

Install Azure cli

$
0
0

 How to install azure cli on Ubuntu:


I am using wsl (Windows Subsystem for Linux) i.e I have a working Ubuntu v20 on my windows desktop & laptop and can you use my windows machine as a regular linux vm. 

More on WSL  https://docs.microsoft.com/en-us/windows/wsl/install-win10


My Ubuntu:

samshaik@shaikprod:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

If you have already azure cli installed then you can remove it as below:

sudo apt remove azure-cli -y && sudo apt autoremove -y

samshaik@shaikprod:~$ sudo apt remove azure-cli -y && sudo apt autoremove -y
[sudo] password for samshaik:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libdumbnet1
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  azure-cli
0 upgraded, 0 newly installed, 1 to remove and 6 not upgraded.
After this operation, 496 MB disk space will be freed.
(Reading database ... 67032 files and directories currently installed.)
Removing azure-cli (2.1.0-1~bionic) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  libdumbnet1
0 upgraded, 0 newly installed, 1 to remove and 6 not upgraded.
After this operation, 91.1 kB disk space will be freed.
(Reading database ... 30029 files and directories currently installed.)
Removing libdumbnet1:amd64 (1.12-7build1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...


You can install azure cli in a single command as below:
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash


samshaik@shaikprod:~$ curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]


Selecting previously unselected package azure-cli.
(Reading database ... 30020 files and directories currently installed.)
Preparing to unpack .../azure-cli_2.22.1-1~bionic_all.deb ...
Unpacking azure-cli (2.22.1-1~bionic) ...
Setting up azure-cli (2.22.1-1~bionic) ...


Verify the version:

samshaik@shaikprod:~$ az -v
azure-cli                         2.22.1

core                              2.22.1
telemetry                          1.0.6

Python location '/opt/az/bin/python3'
Extensions directory '/home/samshaik/.azure/cliextensions'

Python (Linux) 3.6.10 (default, Apr 19 2021, 07:29:42)
[GCC 7.5.0]

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.







Viewing all articles
Browse latest Browse all 191

Trending Articles