-3

I'm trying to install Google authenticator on Ubuntu.

I tried sudo apt install libpam-google-authenticator which results in the error sudo: apt: command not found. Shouldn't apt already be installed on Ubuntu? I have tried several commands with apt. Beware I am very new to Linux.

When I use the command lsb_release -a this is the output:

-bash: lsb_release: command not found

I installed "Ubuntu 20.04 LTS" from the Microsoft Store.

When I use the command cat /etc/os-release this is the output:

NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
$: echo $PATH
/home/mkristiansen/.local/bin:/home/mkristiansen/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
Nmath
  • 12,333
  • Yes, it should. Which version of Ubuntu are you running? And could you please add some screenshots of the message? –  Jan 09 '22 at 19:47
  • 2
    Can you edit the question and post the output of the command lsb_release -a? – Archisman Panigrahi Jan 09 '22 at 19:49
  • 2
    apt is always installed on Ubuntu Server, Ubuntu Desktop, and every official flavour of Ubuntu. Can you tell us how it was removed? – Nmath Jan 09 '22 at 19:53
  • 2
    Are you running Ubuntu in WSL? –  Jan 09 '22 at 20:12
  • I have only installed ubuntu from microsoft store on my windows 10 computer. I have not installed WSL. Thank you – user1560375 Jan 09 '22 at 20:20
  • Could you update with an output of cat /etc/os-release ? – marosg Jan 09 '22 at 20:36
  • Also, please show an output of echo $PATH – marosg Jan 09 '22 at 20:40
  • 3
    Your output clearly shows that you are running CentOS, not Ubuntu. CentOS does not use apt. – user535733 Jan 09 '22 at 21:35
  • 2
  • Ubuntu from the Microsoft Store in Windows 10 is WSL. If you installed any Linux distro on Windows from the Microsoft Store, you are using WSL. 2) You aren't running Ubuntu, you are running CentOS which does not use apt as a package manager, it uses yum 3) CentOS is off-topic. You can ask about CentOS on Unix&Linux.
  • – Nmath Jan 09 '22 at 21:36
  • Why is it running centOS when the program I installed is called ubuntu? And how do I run ubuntu is there something else I need to install? Thank you all for taking your time and help. – user1560375 Jan 09 '22 at 22:11
  • 1
    Somehow you installed CentOS. Perhaps you also installed Ubuntu, but when you entered those commands, you weren't using Ubuntu, you were using CentOS. CentOS is an entirely different Linux distribution and is not very similar to Ubuntu as it is in the "RedHat" family of Linux and Ubuntu is Debian-based. – Nmath Jan 09 '22 at 23:02
  • Ok I see. Do you have a guide on how to install ubuntu properly? – user1560375 Jan 09 '22 at 23:26
  • 1
    @user1560375 Yes. Open the Microsoft Store, click the search bar, and type "Ubuntu". Click on it, and press install. Here is a link to Ubuntu in the Store. Once you've downloaded it, just launch it (from the start menu), do the short setup, and then enjoy it! – cocomac Jan 09 '22 at 23:58
  • @user1560375 If you are using the latest Windows 10 (21H2) or Windows 11 release, simply wsl --install Ubuntu. Cocomac's method works also (for all WSL and Windows releases). – NotTheDr01ds Jan 10 '22 at 02:52
  • I just wanted to add that I logged in to my schools server with ssh username@server-adress and that might be why it was running on centOS, is it that my schools server somehow runs on centOS? When Im logged in on my PC on ubuntu and write command "cat /etc/os-release" it says ubuntu. So only when I ssh to my schools server and write command "cat /etc/os-release" it says centOS? – user1560375 Jan 10 '22 at 13:43