How to use the commands in Root after creating a new user in Linux?


I have created a new user using useradd MyUsername and have given him "sudo" privilege. However, I noticed that I couldn’t use the commands I have installed in root with this user.

For example:

In root : nvm current will show me the current nvm version

In the User : The same command line will give this result : bash: nvm: command not found

I’m using CentOS 7 (I believe). Does anyone have any idea on how to fix this ? Or do I need to download the libraries again in order to use them ?


nvm is intended as a PER-USER script, as stated here.
It is cloned and installed into the home-directory of each individual user.
Therefore, you need to install it again by following the installation instructions.

For other commands, please check that your PATH is correct, or if the command is also installed on a per-user basis like nvm.

Answered By – Mime

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published