nvm will only be available to your user account (the one used to install nvm)
Available to all users if needed. A soft link is required. In addition, it is recommended to use NodeSource’s binary installation script under Ubuntu https://github.com/nodesource...
This should be the reason for the environment variable path. Check whether another user's path contains the nodejs execution directory. In addition, su - username, is different from su root. I wonder if you switch back to root and use su root. If su root, then the current environment variable path is still that of the previous user.
Available to all users if needed. A soft link is required.
In addition, it is recommended to use NodeSource’s binary installation script under Ubuntu https://github.com/nodesource...
This should be the reason for the environment variable path. Check whether another user's path contains the nodejs execution directory.
In addition, su - username, is different from su root. I wonder if you switch back to root and use su root.
If su root, then the current environment variable path is still that of the previous user.