home / linux / lcmd (navigation links)

En esta vida, todo es verdad y todo es mentira;
sólo depende del color del cristal con que se mira

Some Linux commands


Basic info

uname determine kernel version
dmesg prints (or controls) the kernel ring buffer
cat /proc/cpuinfo determine CPU characteristics
cat /proc/interrupts display used IRQs
lspci {-nv}
less /proc/pci
display PCI devices
setserial -a /dev/ttyS2 [COM3]
see man setserial
configure serial port.
Set permanent in [SuSE, Mandrake, Red Hat] /etc/rc.d/rc.local
[Debian] /etc/serial.conf
minicom (or seyon) verify serial connection

Linux does it this way ... hwinfo explicíta quina comanda s'ha fet servir per obtenir cada informació !

See Know Your Hw !


Advanced user

apropos search the whatis database for stings
chkconfig update and query runlevel info for system services. Red Hat only.
chage change user password expiry information.
chroot e.g.- chroot /mnt/hda5
chsh change shell (and display actual).
cron execute scheduled commands. See /etc/crontab
file <Fname> determine what kind of data the file contains.
id display real and effective UIDs and GIDs.
fips Debian partition manager
fuser identify processes using files or sockets. See lsof
ksyms display kernel exported (public) symbols
ldconfig -p determine run-time link bindings
ldd "List Dynamic Dependencies" - print shared library dependencies
lsof list open files. See fuser
magic file command's magic number file (see file)
mknod make block or character special files
Use it when you get mount: special device /dev/fd0 does not exist
mount dev dir e.g.- mount /dev/hda5 /mnt/hda5
namei follow a pathname until a terminal point is found.
ncftp browser program for the FTP.
See also ncftpbatch, ncftpbookmarks, ncftpget, ncftpls, ncftpput.
nmblookup display NetBIOS name (to IP address) cache (10-15 minutes).
used to query NetBIOS names and map them to IP addresses in a network using NetBIOS over TCP/IP queries.
od dump files in octal and other formats (hex dump)
Similar is hexdump
sfdisk manipulate hard disk partition table
pnpprobe scan ISA bus for Pnp sound cards.
See also pnpdump and isapnp.
ulimit set in /etc/profile
xmkmf takes Imakefile and turns it into a Makefile.
zcat "gunzip -c"
zcat -l /usr/lib/kbd/keytables/it.map.gz

Modules management

lsmod list loaded modules
Shows information about all loaded modules.
depmod handle dependency descriptions for loadable kernel modules
insmod install loadable kernel module
modconf Debian only ?
modprobe high level handling of loadable modules
rmmod unload loadable modules

man modules - kernel modules to load at boot time.
The /etc/modules file contains the names of kernel modules that are to be loaded at boot time, one per line.

man modules.conf :
The behaviour of modprobe(8) (and depmod(8) ) can be modified by the (optional) configuration file /etc/modules.conf
A line in /etc/modules.conf that looks like this,

  alias iso9660 isofs
makes it possible to write modprobe iso9660 although there is no object file for such a module available.
Top 25 admin *nix commands

Links

Ep ! Site under construction. Escriu-me ! Actualitzat el 13/oct/2011. Uf !