FreeBSD: Forcefully unmount a disk partition to get rid of device busy error

in Categories last updated August 28, 2006

Under FreeBSD if you get error device busy while unmounting file system then you can forcefully unmount a disk partition or mount point. You can pass -f option to mount command. It forces the read/write mount of an unclean file system. Suppose you would like to unmount /cdrom forcefully then type command (login as a root user use su or sudo command):

# umount -f /cdrom

Where,

  • -f : Forces umount to unmount a disk partition or mounted system

Linux: Find out Ethernet card driver name

in Categories , , , , , , , last updated September 7, 2007

Under Linux, you use term called modules for device drivers. The driver can be loaded or unloaded as per your requirement using commands. Each driver or module gives the Linux information on how to control that particular Ethernet card. The name of each module (driver) is listed in the /etc/modules.conf file.

Command to find out Ethernet card driver name

You can try any one of the following command to find out your Ethernet card driver:

# dmesg | grep 'Ethernet driver'

Output:

8139cp: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004)

Or search a file called /var/log/dmesg:

# grep 'Ethernet driver' /var/log/dmesg

Output:

8139too Fast Ethernet driver 0.9.27
8139cp: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004)

You can also get driver name from config file:

# grep eth0 /etc/modules.conf

Output:

alias eth0 8139too

OR

# vi /etc/modules.conf

Search for eth0 string.

In above example 8139too is driver loaded for eth0. You can find out more information about this driver using modinfo command:

# modinfo 8139too

modinfo program to show information about a Linux Kernel module. You can also find out all loaded modules or drivers using lsmod command:

# lsmod | less

lsmod is a program to show the status of modules in the Linux Kernel.

See also:

FreeBSD Find out who is logged in?

in Categories , , , , last updated January 28, 2007

Q. How do I find out who is logged in and what they are doing?

A. On a FreeBSD, many users will be sharing the same system. If you want to find out if your friend or a coworker is logged in or not on FreeBSD, then you can use following commands.

Please note that following commands works with Linux and other UNIX like oses.

Task:Display who is on the system

To display who is on the system type following command at shell prompt:

$ who
$ who | grep vivek
$ who | less

The who utility displays information about currently logged in users. By default, this includes the login name, tty name, date and time of login and remote hostname if not local.

Task: Find out what user doing

You use w command to display who is logged in and what they are doing:

$ w

You can use the last utility to display either list the sessions of specified users, ttys,
and hosts, in reverse time order, or list the users logged in at a specified date and time.

$ last
$ last root

See also: