Solved

getting the message bash: lsmod: command not found

Posted on 2012-04-04
10
797 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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

696 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