We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now


Linux Question

rafael_acc asked
Medium Priority
Last Modified: 2013-12-23
Hi Experts,

I've been using windows for ages now. Suddenly, I decided giving a try to linux. I'm experiencing some problems though regarding the LSMOD command. I know what it does but it looks like it just doesn't exist. Anyway ... let me give some more details:

Running FreeBSD hosted by windows VMWare 5.0. After I have finished the installation, i tried to install vmware tools ... this was straight forward once  -so i've done it before. though, now I'm getting this message that "lsmod" command cannot be found.

It really looks like the command is not installed. When i run "which lsmod" i get nothing useful - well, i know this could also be related to the path not being included in the PATH env variable.

Anyway, the question is: Is there anyway I could install a package or somethign similar to make the command available?

Watch Question

Top Expert 2005

It usually is in /sbin
but You may need to be root to run that
also try: cat /proc/modules


it is not in /sbin - I checked that before i posted the question.
What would be the purpose of running cat /proc/modules since "cat" is a concatenation tool ?


do you have modutils installed?
Dushan De SilvaTechnology Architect

Insert Linux Installtion CD, then select the perticular package from the package list and install it.

BR Dushan


Is there anyone that really have FreeBSD to guide me through. Under my install there is a tool called SYSINSTALL which is sort of "add/remove programs" under windows. I cannot find any distribution/package with the name modutils. I did find "mtools" but after installing it, there is no difference.

Please advice.


And by the way, what is the difference between the distribution and package (I'm not talking about different Linux distributions!).

Top Expert 2015

FreeBSD does not have lsmod. Equivalent command is kldstat.
FreeBSD is not Linux, similar parts are those that are common to all UNIX-es.
Top Expert 2015



Ohh ... finally an acceptable answer ... What about if I rename the file from kldstat to lsmod ? do you think I could fool vmware-tools ?

Top Expert 2015

No - FreeBSD is different from Linux, it supports userland programs made for linux, bu in no way kernel modules.
Better then " ln -s `which true` /bin/lsmod " just to fool vmware
I guess if you *really* wanted to install the VMWare tools you could fool VMWare/FreeBSD, keeping in mind any kernel modules it installs won't run on FreeBSD.

There is a port in the ports tree for the VMWare tools, but I'm not sure if it's what you need?

check in /usr/ports/emulators/

(make sure you installed the ports tree - you can do this from sysinstall)

cd /usr/ports/emulators/vmware-tools-VERSION
make clean && make && make install

read the pkg-descr and other readme files in that directory it should get you going


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Thanks ryan,

I'll try your suggestion. It sounds good. I am not sure when am I gonna be able to come with any feedback though.

Top Expert 2015

No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept ryanhunt http:#16443385

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer
I had a very similar problem with VMWare 6.0, and it was traced to having the wrong Guest operating system selected. In the virtual machine settings, on the options pane is where the setting is. I had created the virtual machine as a Linux variant because I didn't see a FreeBSD item in the available options in the Wizard.

Anyway, select Other, then in Version select FreeBSD or the 64-bit equivalent to tell VMWare the actual OS you're going to load.

What this setting does is that it changes the VMTools edition that shows up in the cdrom. Logged in as root, here are the commands to run. some device and folder names might vary for you. Especially, your cdrom device name might be different; check the /dev folder to find the right name.
    mount -r /dev/acd0 /cdrom
    cd /tmp
    mkdir /vmtools
    cd vmtools
    tar zxpf /cdrom/vmware-freebsd-tools.tar.gz
    umount /cdrom
    cd vmware-tools-distrib

That (for me at least) was what it took. As an earlier poster mentioned, FreeBSD doesn't have the module utilities because those are part of the varieties of Linux that are closer to the mainline. Thus, FreeBSD has different scripts in the VMTools install that don't use commands that don't work.

Once the proper Guest OS is chosen, the Install VMTools command provides the correct set of files, which use the proper commands so it can do the install properly.

Looking at it from the opposite direction, the original poster ran the VMTools install script, which asked for a command that didn't exist. If he had managed to fix the lsmod, he'd find the script just wanted a different command that also didn't exist (yes, I tried that). In any event, the script wanted the wrong command because it was extracted from the wrong TAR file, because VMWare presented the wrong CD image, because the Client OS type was set incorrectly for the actual OS that was installed.

correction to the above, sorry for the bad edit-check before posting!

mount should be mount_cd9660, only 'cause that's what worked for me
also, the "options pane" mentioned above is really a "tab"

Again, sorry for those minor gotchas
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.