Solved

getting the message bash: lsmod: command not found

Posted on 2012-04-04
10
776 Views
Last Modified: 2012-04-05
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 ?
0
Comment
Question by:c_hockland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 

Author Comment

by:c_hockland
ID: 37808527
i am sorry , i menat

SHELL=/usr/bin/bash

and no luck
0
 
LVL 40

Accepted Solution

by:
omarfarid earned 250 total points
ID: 37808544
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
 
LVL 6

Expert Comment

by:Patrick Tallarico
ID: 37808553
Check this out and see what you PATH environment variable is looking at.
http://www.troubleshooters.com/linux/prepostpath.htm
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 38

Assisted Solution

by:Gerwin Jansen, EE MVE
Gerwin Jansen, EE MVE earned 250 total points
ID: 37808613
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
 

Author Comment

by:c_hockland
ID: 37808724
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
 
LVL 40

Expert Comment

by:omarfarid
ID: 37808735
did you try to source the .bash_profile as shown above?
0
 

Author Comment

by:c_hockland
ID: 37808774
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
 
LVL 40

Expert Comment

by:omarfarid
ID: 37808776
please note that you have a typo in pATH it should be PATH
0
 

Author Comment

by:c_hockland
ID: 37808781
yes , u r right . I typed it correclty and it worked.
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 37808799
you may add the commands to ~/.profile or ~/.bash_profile
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question