getting the message bash: lsmod: command not found

hi ,

i am working on RhEL server and almost every command i type i get
bash : command not found

i did

# bash
return

tried and nothing

i did

# PATH = /sbin/bash

nothing

any ideas ?
c_hocklandAsked:
Who is Participating?
 
omarfaridConnect With a Mentor Commented:
The PATH variable setting is not correct. Did you try to logout / login again. Try to source ~/.profile or ~/.bash_profile with command

. ~/.profile

or

. ~/.bash_profile

Please note the dot and space in the above commands

Then see what you get when you run

echo $PATH
0
 
c_hocklandAuthor Commented:
i am sorry , i menat

SHELL=/usr/bin/bash

and no luck
0
 
Patrick TallaricoFSEP Systems AnalystCommented:
Check this out and see what you PATH environment variable is looking at.
http://www.troubleshooters.com/linux/prepostpath.htm
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
Gerwin Jansen, EE MVEConnect With a Mentor Topic Advisor Commented:
Try setting your path like this:

PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
export PATH

Then try one of your commands.
0
 
c_hocklandAuthor Commented:
i did and i got he following

[h80613@ussef301 proc]$ ~/.bash_profile
bash: /home/h80613/.bash_profile: Permission denied


do i need to be added to sudo group ?
0
 
omarfaridCommented:
did you try to source the .bash_profile as shown above?
0
 
c_hocklandAuthor Commented:
v
[h80613@ussef301 proc]$ pATH=/usr/local/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
[h80613@ussef301 proc]$ export pATH
[h80613@ussef301 proc]$ lsmod
bash: lsmod: command not found
0
 
omarfaridCommented:
please note that you have a typo in pATH it should be PATH
0
 
c_hocklandAuthor Commented:
yes , u r right . I typed it correclty and it worked.
0
 
omarfaridCommented:
you may add the commands to ~/.profile or ~/.bash_profile
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.