NX Server access to Red Hat - "Command not Found" in Terminal on many system commands

NX Server is a great improvement over VNC but many system commands in Terminal give the message "Command not Found" when connected remotely.
Such as 'ifconfig' or 'shutdown"

NX Server will not let you connect as Root, but after changing to Root after the initial login, the commands are still not found.

I don't know much about Linux, so if this is a path issue or something like that please explain for a new user.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi swbruce21,

> but after changing to Root after the initial login, the commands are
> still not found.
Insead of "su", use "su -" for accessing root shell. This will get you root's environment as well (PATH variable value is what you need to find the commands)

These commands are typically stored in sbin directories ... you can also execute them by specifying complete path e.g. /sbin/ifconfig.
Former method is obviously less cumbersome.

Kelly BlackSenior Linux / DBA / DEVOPSCommented:
Can you provide some more information such as the release of Linux you are using, and what NX server details you have?

cat /etc/*release*
cat /etc/redhat-release (I think)

uname -ar

When logged in as a user on NX then when you sudo to super user, make sure you use a "-" dash at the end....

su -


~K Black
sunnycode is spot on.

If you really do want to run commands like ifconfig as a non-root user, add /sbin to your path (in your ~/.bash_profile)

export PATH=$PATH:/sbin

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.