- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- no command is working
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2015 12:52 AM - last edited on 04-16-2015 07:40 PM by Maiko-I
04-16-2015 12:52 AM - last edited on 04-16-2015 07:40 PM by Maiko-I
no command is working
on my quest to fingdthe right PATH command on the right file i probably made the wrong change.
and now the situation is that no command is working beside "pwd" and "cd"
can you help me fix this?
P.S. This thread has been moved from HP-UX > System Administration to HP-UX > languages. - Hp Forum moderator
- Tags:
- PATH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2015 02:50 AM
04-16-2015 02:50 AM
Re: no command is working
I remember you changed PATH variable yesterday to get bash working. How did you do this?
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2015 06:42 AM
04-16-2015 06:42 AM
Re: no command is working
You should always be able to run commands be specifying the full path to the command.
A lot of commands that you regularly use are stored in the /usr/bin directory. So to run a command like 'vi' you would do:
# /usr/bin/vi
To edit your /etc/PATH file again do:
# /usr/bin/vi /etc/PATH
and undo any changes you made yesterday.
You will then likely have to login again and make sure your path is working. Do NOT log out of your current session until you are sure you can login successfully again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2015 12:35 PM
04-16-2015 12:35 PM
Re: no command is working
>no command is working beside "pwd" and "cd"
These are shell builtins, so they will always work.
You need to change PATH:
export PATH=/usr/bin:$PATH
Then figure whether you want to modify /etc/PATH or each user's ~/.profile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2015 06:49 AM - edited 04-17-2015 06:50 AM
04-17-2015 06:49 AM - edited 04-17-2015 06:50 AM
Re: no command is working
If you typed this command:
PATH=/usr/local/bin
to get bash to run, now the pathnames for other commands have been removed and you must use the full path for everything else. That's why none of the usual commands seemed to have disappeared. The PATH variable (just like DOS/Windows) is a helper to save you from having to type the full pathname for every command.
The correct way to add a new path is:
PATH=$PATH:/usr/local/bin
If you type the first command above and did not store this line in your profile, log out and and back in again and your PATH will be restored and the other commands will be found again.
If it was stored in /etc/profile or .profile, then use /usr/bin/vi to edit the file to the correct string. Then log out and back in again to restore your PATH variable.
If you edited /etc/PATH and you did not keep a copy of the old file, you'll need to restore the old file from your most recent backup.
Bill Hassell, sysadmin