≡ Menu

linux distribution

Linux: Find out what kernel drivers (modules) are loaded

Q. How do I find out what Linux kernel drivers and loaded by my Linux distribution? How do I list device drivers (modules) loaded in memory?

A. Under Linux use the file /proc/modules shows what kernel modules (drivers) are currently loaded.

lsmod command

You need to use lsmod command to show the status of modules in the Linux Kernel. Simply type the lsmod at a shell prompt:
$ lsmod

Module                  Size  Used by
binfmt_misc            12680  1 
rfcomm                 40856  0 
l2cap                  25856  5 rfcomm
bluetooth              55908  4 rfcomm,l2cap
ppdev                  10116  0 
acpi_cpufreq           10056  1 
cpufreq_stats           7360  0 
cpufreq_userspace       5408  0 
cpufreq_conservative     8200  0 
cpufreq_ondemand        9228  4 
cpufreq_powersave       2688  0 
freq_table              5792  3 acpi_cpufreq,cpufreq_stats,cpufreq_ondemand
pcc_acpi               13184  0 
dev_acpi               12292  0 
tc1100_wmi              8068  0 
sony_acpi               6284  0 
dock                   10268  0 
sbs                    15652  0 
asus_acpi              17308  0 
ac                      6020  0 
battery                10756  0 
i2c_ec                  6016  1 sbs
video                  16388  0 
backlight               7040  1 asus_acpi
container               5248  0 
button                  8720  0 
nls_utf8                3072  1 
ntfs                  107764  1 
eeprom                  8336  0 
i2c_i801                9356  0 
sbp2                   23812  0 
lp                     12452  0 
fuse                   46612  0 
af_packet              23816  2 
snd_hda_intel          21912  4 
snd_hda_codec         205056  1 snd_hda_intel
snd_pcm_oss            44544  0 
snd_mixer_oss          17408  1 snd_pcm_oss
snd_pcm                79876  4 snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_seq_dummy           4740  0 
snd_seq_oss            32896  0 
tuner                  61864  0 
snd_seq_midi            9600  0 
snd_rawmidi            25472  1 snd_seq_midi
bttv                  173684  0 
video_buf              26116  1 bttv
snd_seq_midi_event      8448  2 snd_seq_oss,snd_seq_midi
ir_common              31236  1 bttv
nvidia               6224240  24 
compat_ioctl32          2304  1 bttv
snd_seq                52592  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
i2c_algo_bit            8712  1 bttv
btcx_risc               5896  1 bttv
snd_timer              23684  3 snd_pcm,snd_seq
snd_seq_device          9100  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
tveeprom               15888  1 bttv
iTCO_wdt               11812  0 
iTCO_vendor_support     4868  1 iTCO_wdt
parport_pc             36388  1 
agpgart                35400  1 nvidia
tsdev                   8768  0 
parport                36936  3 ppdev,lp,parport_pc
snd                    54020  16 snd_hda_intel,snd_hda_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore               8672  1 snd
i2c_core               22656  8 i2c_ec,eeprom,i2c_i801,tuner,bttv,nvidia,i2c_algo_bit,tveeprom
rt61                  245128  1 
psmouse                38920  0 
snd_page_alloc         10888  2 snd_hda_intel,snd_pcm
videodev               28160  1 bttv
v4l2_common            25216  3 tuner,bttv,videodev
v4l1_compat            15236  1 videodev
serio_raw               7940  0 
shpchp                 34324  0 
pci_hotplug            32576  1 shpchp
evdev                  11008  3 
pcspkr                  4224  0 
ipv6                  268960  20 
ext3                  133128  1 
jbd                    59816  1 ext3
mbcache                 9604  1 ext3
sg                     36252  0 
sr_mod                 17060  0 
sd_mod                 23428  4 
cdrom                  37664  1 sr_mod
generic                 5124  0 [permanent]
ata_generic             9092  0 
ohci1394               36528  0 
ieee1394              299448  2 sbp2,ohci1394
pata_marvell            7936  0 
ata_piix               15492  3 
libata                125720  3 ata_generic,pata_marvell,ata_piix
scsi_mod              142348  5 sbp2,sg,sr_mod,sd_mod,libata
e1000                 126016  0 
ehci_hcd               34188  0 
uhci_hcd               25360  0 
usbcore               134280  3 ehci_hcd,uhci_hcd
thermal                14856  0 
processor              31048  2 acpi_cpufreq,thermal
fan                     5636  0 
fbcon                  42656  0 
tileblit                3584  1 fbcon
font                    9216  1 fbcon
bitblit                 6912  1 fbcon
softcursor              3200  1 bitblit
vesafb                  9220  0 
capability              5896  0 
commoncap               8192  1 capability

Get more information about driver

To get more information about specific driver, enter:
modinfo {driver-name}
$ modinfo e1000

filename:       /lib/modules/2.6.20-16-generic/kernel/drivers/net/e1000/e1000.ko
version:        7.3.15-k2-NAPI
license:        GPL
description:    Intel(R) PRO/1000 Network Driver
author:         Intel Corporation, 
srcversion:     037027F24F37E1AAEFC4360
alias:          pci:v00008086d000010C5sv*sd*bc*sc*i*

Sysadmin because even developers need heroes!!!

Is my hardware compatible with Linux?

Q. After spending last 6 years with Windows, I’m ready to give out Windows XP and move to Linux. Hardware compatibility is particularly important to me. Here is my configuration:
Intel Pentium D 930 CPU
Intel On board display and sound card
2 x 120 GB hard disk
Sony DVD writer
USB Pen and 1.44 MB Floppy etc

I use computer for Internet / Email and OO for document writing. I need system for writing Perl and PHP code.

Is my hardware compatible with Linux? Which Linux distribution is easy to use?

A. Most old and Intel technology should work with Linux. It is hard to guarantee that your hardware will be 100% compatible. The best way to check this is download any one of the available Live CD from the net. Burn the disk and simply boot from Live CD. If everything worked out fine, you can backup all data and install Linux.

I recommend Ubuntu Linux for new users but there are other distros as well. Check out this post about selecting Linux distributions.

HowTo Disable The Iptables Firewall in Linux

I need to disable firewall in Linux for testing purpose. I’m using CentOS and RHEL version 4.4 / 5 / 6. How do I disable the firewall in Linux?
[click to continue…]

Move or migrate user accounts from old Linux server to a new Linux server

Q. How do I Move or migrate user accounts to from old Linux server a new Cent OS Linux server including mails? This new system a fresh installation.

A. You can migrate users from old Linux server to new Linux sever with standard commands such as tar, awk, scp and others. This is also useful if you are using old Linux distribution such as Redhat 9 or Debian 2.x.

Following files/dirs are required for traditional Linux user management:
* /etc/passwd – contains various pieces of information for each user account

* /etc/shadow – contains the encrypted password information for user’s accounts and optional the password aging information.
[click to continue…]

Where do I download Red Hat Enterprise Linux?

Q. Where do I download Red Hat Enterprise Linux?

A. Red Hat Enterprise Linux is not available for download. It is a commercial and supported Linux distribution.

Red Hat Network (RHN) (free registration required) has the trial version or demo version and you can download ISO images for Red Hat Enterprise Linux. After evaluation period you need to purchase support.

However I recommend downloading CentOS which is 100% Red Hat Enterprise Linux based free system. Another option is to try out Debian stable Linux.

You may also get free RedHat Enterprise Linux (RHEL) if you are leasing a server from dedicated hosting service providers.

How do I turn on telnet service on for a Linux / FreeBSD system?

Q. Can you example how can I install telnet service or server under Linux or FreeBSD operating system?

A. TELNET (TELetype NETwork) is a network protocol used on the Internet or local area network LAN connections.

The telnetd program (telnet server) is a server which supports the DARPA telnet interactive communication protocol. Telnetd is normally invoked by the internet server inetd or xinetd for requests to connect to the telnet port as indicated by the /etc/services file. Usaually telnet listen on port TCP port 23.

Telnet in is insecure protocol and it is recommended that you use ssh server. But some time you really need telnet then first install telnet server as according to version of Linux distribution.

Telnet server installation

WARNING! Installing telnet open your computer to unencrypted network communication, which is a bad idea. If possible avoid telnet; and use secure shell called ssh.

Debain/Ubuntu Linux user type the following command:
# apt-get install telnetd
$ sudo apt-get install telnetdFedora Linux user the following command:
# yum install telnet-server telnetRed Hat enterprise Linux user type the following command:
up2date telnet-server telnetFreeBSD user type the following command:
No need to install new (telnet server) package, it is installed by default (/usr/libexec/telnetd)

Configure telnet server (turn on telnet server)

Again each distribution has its own method to turn on or off telnet service; same applies to telnet UNIX/Linux server.

If you are using Red Hat / Fedora Linux
The configuration file for telnet is /etc/xinetd.d/telnet. To enable telnet server you need to open this file and make sure disable = no read as disable = yes.
# chkconfig telnet onTo start telnet server type command:
# /etc/init.d/xinetd restartIf you are using Debian Linux
The configuration file for telnet is /etc/inetd.conf. By default it is enabled when you install telnet server. To start telnet server type command:
# /etc/init.d/inetd restartIf you are using FreeBSD
The configuration file for telnet is /etc/inetd.conf. Open file using vi text editor and uncomment line:
# vi /etc/inetd.conf
Make sure commented line:
#telnet stream tcp nowait root /usr/libexec/telnetd telnetdRead as follows:
telnet stream tcp nowait root /usr/libexec/telnetd telnetdSave and close the file. Start telnet service:

Enable inetd service so that telnet get loaded:
# vi /etc/rc.confAppend/add following line to configuration file:
inetd_enable="YES"Save and close the file, Rsstart telnet via inetd service:
# /etc/rc.d/inetd restart

Telnet to server (How do I use telnet client?)

You should now be able to telnet to the server from Windows or Linux desktop system. Type the following command to connect to Telnet server:telnet server-ip-address

Linux – What defines a user account?

Q. Can you tell us what defines a user account under Linux operating system?
[click to continue…]