newgrp command not found

In this troubleshooting guide we learn how to fix newgrp command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

newgrp: command not found

or when using sudo you get the following error message

sudo: newgrp: command not found

Solutions to newgrp: command not found

How To Fix newgrp: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu newgrp is provided by login package.

login is:

This package provides some required infrastructure for logins and for changing effective user or group IDs, including:

  • login, the program that invokes a user shell on a virtual terminal;
  • nologin, a dummy shell for disabled user accounts;
  • su, a basic tool for executing commands as root or another user.

To fix this problem, we can install more using the command below.

sudo apt-get -y install login

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install login.

sudo apt -y install login

Or if you have aptitude installed you can use the following command.

sudo aptitude install login

Summary

In this tutorial we learn how to fix newgrp command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.