Professional Documents
Culture Documents
Table of Contents
About this document.....................................................................vii Regarding the LPI 101 Exam........................................................viii
Approximate number of questions per topic..........................................................viii Peso per topic.........................................................................................................viii Tips on writing the exam..........................................................................................ix
LPIC 101 Guia de Preparacion Booting from SCSI drive.....................................................................................15 SCSI in Linux......................................................................................................15 Naming of SCSI devices.....................................................................................16 1.101.5 Setup different PC expansion cards...............................................................17 Tools........................................................................................................................17 PCI..........................................................................................................................17 1.101.6 Configure Communication Devices................................................................19 Tools........................................................................................................................19 Modem AT Commands............................................................................................20 1.101.7 Configure USB devices...................................................................................21 Summary.................................................................................................................21 USBDevFS Filesystem............................................................................................22 Architecture of USB Modules.................................................................................22 List of current USB modules...................................................................................23 Dynamically loading USB Modules.........................................................................23 hotplug...............................................................................................................23 USB Manager (usbmgr)......................................................................................24
LPIC 101 Guia de Preparacion Querying rpm packages that are not installed....................................................39 Advanced Examples............................................................................................39 Verifying integrity of packages...............................................................................40 PGP and GPG Signature test..............................................................................40 Extract from RPM Man page..................................................................................40 QUERYING AND VERIFYING PACKAGES..........................................................40 INSTALLING, UPGRADING, AND REMOVING PACKAGES................................41 MISCELLANEOUS.............................................................................................41 SELECT-OPTIONS..............................................................................................41 QUERY-OPTIONS...............................................................................................41 INSTALL-OPTIONS.............................................................................................41
Summary.................................................................................................................42 1.103.1 Work on the command line.............................................................................43 Shell (local) and Environment (exported) variables................................................43 Exported variables (Environment variables)......................................................43 Setting and unsetting variables..........................................................................44 Read-Only Variables (variable cannot be changed or unset)..............................44 $TERM (present terminal type)..........................................................................44 Command substitution............................................................................................44 Command history and editing.................................................................................44 Command history navigation..............................................................................44 Command Line Editing commands.....................................................................45 Applying commands recursively (-r,-R,--recursive).................................................45 man and info...........................................................................................................46 1.103.2 Process text streams using filters..................................................................47 Commands list........................................................................................................47 Command Examples...............................................................................................48 cut -dx -fy............................................................................................................48 expand................................................................................................................48 unexpand............................................................................................................48 fmt......................................................................................................................48 head [-|+][n]x.....................................................................................................48 join.....................................................................................................................48 nl........................................................................................................................48 od -bih -t x..........................................................................................................49 paste...................................................................................................................49 pr........................................................................................................................50 split -lx -by[b|k|m]...............................................................................................50 cat.......................................................................................................................50 tac.......................................................................................................................50 tail [-|+][n]x........................................................................................................51 tr -d.....................................................................................................................51 wc -l|-c|-w...........................................................................................................51 xargs...................................................................................................................51 sed......................................................................................................................51 sort -ky[n] -tx......................................................................................................52 grep [-virns]........................................................................................................52 more...................................................................................................................52 less.....................................................................................................................52 uniq....................................................................................................................52 awk -Fx...............................................................................................................52 1.103.3 Perform basic file management......................................................................54 cd........................................................................................................................54 iii
LPIC 101 Guia de Preparacion ls.........................................................................................................................54 cp........................................................................................................................54 mv.......................................................................................................................55 mkdir..................................................................................................................55 rmdir..................................................................................................................55 touch..................................................................................................................55 File naming wildcards (globbing).......................................................................55 Finding files with find.........................................................................................55 1.103.4 Use streams, pipes, and redirects..................................................................56 Standard I/O...........................................................................................................56 pipes ('|').................................................................................................................56 | xargs.....................................................................................................................56 Redirection.............................................................................................................57 >.........................................................................................................................57 >>......................................................................................................................57 <.........................................................................................................................57 <<......................................................................................................................57 Combining outputs.............................................................................................57 tee......................................................................................................................57 1.103.5 Create, monitor, and kill processes................................................................59 Process Viewing Commands...................................................................................59 Signalling active processes.....................................................................................60 Terminating processes............................................................................................60 Shell job control and '&'.........................................................................................61 1.103.6 Modify process execution priorities...............................................................63 1.103.7 Search text files using regular expressions....................................................64 1.103.8 Perform basic file editing operations using vi................................................65
Summary.................................................................................................................67 I-nodes................................................................................................................67 Content of boot Block.........................................................................................67 Content of Super Block (partial).........................................................................67 Content of Normal inodes...................................................................................67 EXT2 Filesystem.................................................................................................68 Some differences between EXT2 and normal filesystem....................................68 Journaling Filesystems.......................................................................................69 1.104.1 Create partitions and filesystems...............................................................69 Notes......................................................................................................................70 Partitioning.............................................................................................................70 Creating a filesystem..............................................................................................71 1.104.2 Maintain the integrity of filesystems..............................................................73 Disk Usage..............................................................................................................73 Disk Free................................................................................................................73 File system check....................................................................................................73 File system debugging............................................................................................74 File system info dump.............................................................................................74 File system tweaking..............................................................................................74 1.104.3 Control mounting and unmounting filesystems..............................................76 1.104.4 Managing disk quota......................................................................................78 Summary.................................................................................................................78 Procedure for installing quotas...............................................................................78 Detailed preparation of quotas...............................................................................79 Repquota.................................................................................................................80 Quotaon and Quotaoff.............................................................................................80 iv
LPIC 101 Guia de Preparacion Files involved with disk quotas...............................................................................81 1.104.5 Use file permissions to control access to files................................................82 File type..................................................................................................................82 Files and directory access rights............................................................................82 Changing a file's access rights...........................................................................82 Directory access rights.......................................................................................83 Attributes (chattr & lsattr).................................................................................84 1.104.6 Manage file ownership...................................................................................86 chown.....................................................................................................................86 chgrp.......................................................................................................................87 chmod.....................................................................................................................88 1.104.7 Create and change hard and symbolic links...................................................89 1.104.8 Find system files and place files in the correct location.................................91 find..........................................................................................................................91 locate......................................................................................................................92 slocate.....................................................................................................................92 whereis...................................................................................................................93 which......................................................................................................................93
LPIC 101 Guia de Preparacion Starting an X session with xdm/kdm/gdm.............................................................109 X11 on the network...............................................................................................110 Preparing the X Client......................................................................................110 Preparing the X-Server.....................................................................................110 Permanently allowing access to an X-Server....................................................110 Checking library dependencies for X-Client programs.........................................110
Glossary of Terms........................................................................111
vi
LPIC 101 Guia de Preparacion documento, que me ayudara a mejorarlo. Cualquier tipo de retroalimentacin es bienvenida. Si alguien quiere contribuir a este documento, ser bienvenido, por favor contacteme a: michel@linuxint.com Espero que lo ayude a prepararse para el examen LPI 101 y recuerde que la prctica, prctica y ms prctica es la clave.
viii
Hardware & Arquitectura.............................................................................................7 Instalacin de Linux & Gestin de paquetes...............................................................14 Ordenes GNU & Unix..................................................................................................20 Dispositivos, Sistema de archivos Linux, Jerarqua estndar......................................16 El Sistema X Window....................................................................................................8
parmetros fundamentales del BIOS....................................1 tarjetas de sonido y de modem.............................................1 dispositivos SCSI..................................................................1 diferentes tarjestas de expancin en la PC...........................3 dispositivos de comunicacin................................................1 dispositivos USB...................................................................1 22
Disear la organizacin del disco............................................................5 Instalar un gestor de arranque................................................................1 Construir e instalar programas desde cdigo fuente..............................5 Gestionar bibliotecas compartidas..........................................................3 Gestin de paquetes en Debian (DEB)....................................................8 Gestin de paquetes en Red Hat (RPM)..................................................8 Ordenes GNU & Unix 31 Trabajo en la lnea de rdenes................................................................5 Procesar flujos de texto usando filtros....................................................6 Realizar gestin bsica de archivos........................................................3 Uso de flujos, tubera y redireccionamiento............................................5 Crear, monitorear, y terminar procesos..................................................5 Modificar la prioridad de ejecucin de procesos.....................................3 Buscar en archivos de texto usando expresiones regulares....................3 Realizar operaciones bsicas de edicin de archivos con vi....................1 Dispositivos, Sistema de archivos Linux, Jerarqua Estandar 24 Crear particiones y sistema de archivos.................................................3 Mantener la integridad del sistema de archivos.....................................3 ix
LPIC 101 Guia de Preparacion 1.104.3 1.104.4 1.104.5 1.104.6 1.104.7 1.104.8 Tpico 110 1.110.1 1.110.2 1.110.4 Controlar el montar y desmontar sistema de archivos ...........................3 Gestionar cuotas de disco.......................................................................3 Usar permisos de archivo para controlar acceso a ellos.........................5 Gestionar la propiedad de archivos.........................................................1 Crear y cambiar enlaces simblicos y rgidos.........................................1 Buscar archivos del sistema y colocarlos en su ubicacin correcta........5 El Sistema X Window 13 Instalar & Configurar XFree86...............................................................5 Configurar un gestor de visualizacin.....................................................3 Instalar & personalizar un Gestor de Ventanas.......................................5
Configuracin fundamentales de la BIOS................................................1 Configurar modem y placa de sonido......................................................1 Configurar dispositivos SCSI..................................................................1 Configurar diferentes tarjetas de expancin de PC.................................3 Configurar dispositivos de comunicacin................................................1 Configurar dispositivos USB...................................................................1
Resmen
Generalidades de Hardware
Procesador, BIOS, RAM , Sistema de bus de direcciones, Sistema de bus de datos, direcciones de E/S y conflictos de IRQ. Tabla IRQ Usado por el sistema: 1,2,6,8,14,15 Generalmente libre: Quizas liberable: Compartiendo IRQ Generalmente sin problemas con PCI, no deseable con ISA DMA 8 canales DMA. El canal DMA 4 est siempre ocupado. Normalmente se usan: DMA 1, 2 o 3. Observer por conflictos de DMA Configurando direcciones de E/S, IRQ y DMA Perifricos integrados en la placa base: via BIOS Antiguas tarjetas de expansin ISA: Jumpers e interruptores DIP en las tarjetas Nuevas tarjetas de expansin ISA: Jumpers para direcciones E/S e IRQ por software Tarjetas de expansin ISA Conectar-y-Usar (Plug-And-Play): Caracterstica del BIOS o del sistema operativo Tarjetas de expansin PCI: Via BIOS y sistema operativo usando el bus PCI Direccin de memoria base de ciertas tarjetas PCI 5,9,10,11,13 3,4,7,12
Tpico 101: Hardware & Arquitectura Es bueno para mostrar los dispositivos encontrados en el sistema a la windows. (SuSE) hwinfo Muestra un montn de informacin sobre el hardware automticamente econtrado. (SuSE) lsdev Muestra una lista de los dispositivos renocidos y sus direcciones de E/S, IRQ y DMA procinfo Muestra una lista de los dispositivos renocidos y sus direcciones de E/S, IRQ y DMA MAKEDEV Orden para crear archivos de dispositivo losetup Configura y controla dispositivos bucle (loop devices)
Tpico 101: Hardware & Arquitectura /etc/modprobe.conf Nuevo archivo de configuracion para la orden modprobe que tiene el mismo propsito que el archivo /etc/modules.conf (antiguo). Nota: No he determinado que resultados se pueden obtener si ambos archivos de configuracin estn presentes en el sistema. Lista las opciones utilizadas para cargar mdulos indicados en /etc/modprobe.conf: modprobe -c
PCI
lspci Lista todos los dispositivos PCI, de manera fcil de leer cat /proc/pci Lista todos los dispositivos PCI, con abundante informacin setpci Configura dispositivos PCI pcitweak Lista, escribe y lee el espacio de configuracin PCI scanpci Registra/prueba el bus PCI /sbin/hotplug Script; maneja dispositivos PCI & USB conectables en caliente (hot-pluggable) rchotplug [start|stop] Incia/detiene el configurador de USB y PCI. (SuSE)
PCMCIA
cardinfo Programa X para listar y controlar tarjetas PCMCIA cardctl Programa de consola para controlar tarjetas PCMCIA dump_cis Programa de consola para listar tarjetas PCMCIA y sus parmetros cardmgr Demonio que carga y descarga mdulos PCMCIA para las tarjetas insertadas. /etc/init.d/pcmcia Script que carga cardmgr como demonio
PNP
lspnp Lista dispositivos de Conectar-y-Usar (Plug and Play) y los recursos disponibles /etc/isapnp.conf Archivo usado por isapnp para configurar dispositivos PnP Vea tambin la . pgina del manual de setpnp para ms informacin sobre el control de recursos para dispositivos PnP . isapnp /etc/isapnp.conf Configura los dispositivos PnP de acuerdo a /etc/isapnp.conf
SCSI
sg_map Muestra el mapeo entre dispositivos sg y otros dispositivos SCSI. cat /proc/scsi/scsi Muestra informacin de todos los posibles dispositivos SCSI: hdx, srx, sgx, scdx scsiinfo -l Lista dispositivos SCSI activos en el sistema. ej. /dev/sda /dev/scd0 etc. sg_reset ejercita la capacidad (capability) de resetear el dispositivo/bus/anfitrin SCSI scsi_info Herramienta de descripcin de un dispositivo SCSI sg_test_rwbuf Prueba el adaptador SCSI del anfitrin (SCSI host adapter) realizando operaciones de lectura y escritura en el buffer del dispositivo y calculando cifras de comprobacin. 5
Tpico 101: Hardware & Arquitectura lsscsi Lista todos los dispositivos SCSI (o anfitriones) presentes en el sistema mover utilidad para controlar cambiadores de medios SCSI sg_scan Hace un registro del bus SCSI y enva el resultado a la salida estndar STDOUT sg_senddiag Ejecuta una orden SCSI SEND DIAGNOSTIC sg_logs Lee las pginas de registro SCSI LOG SENSE scsidev Pobla /dev/scsi con nombres de dispotivo que son persistentes contra cambios a la configuracin SCSI. sg_start Inicia (spins-up) o detiene (spins down) dispositivos SCSI sg_readcap Llama a la orden READ CAPACITY en un dispositivo SCSI sg_rbuf Lee datos utilizando la orden SCSI READ BUFFER sg_inq Entrega los datos recuperados con la orden SCSI INQUIRY sginfo outputs mode sense information for a SCSI generic device sg_modes Lee las pginas SCSI MODE SENSE xmover Herramienta X11 para cambiadores de medio SCSI scsi_devfs_scan Registra dispositivos SCSI en un rbol devfs sane-find-scanner Busca scanners SCSI y USB y sus respectivos archivos de dispositivo scsiformat Formato a bajo nivel de un disco SCSI
SERIAL
cat /proc/tty/drivers Muestra los puertos seriales detectados. 6
CDROMS
cat /proc/sys/dev/cdrom/info Informacin de la unidad de CD-ROM y sus capacidades. Nota: Unidades cd CDROM SCSI pueden ser dispositivos scdx (/dev/scdx)
I/O ADDRESSES
cat /proc/ioports Direcciones de E/S utilizadas por los dispositivos.
I/O MEMORY
cat /proc/iomem Direcciones de memoria utilizadas.
INTERRUPTS
cat /proc/interrupts Interrupciones en uso
DMA
cat /proc/dma Canales DMA en uso.
CPU
cat /proc/cpuinfo Informacin de procesador
DEVICES
cat /proc/devices Dispositivos de caracteres y bloques utilizados junto a sus identificadores (IDs). lsdev Muestra datos de IRQ, DMA y puertos de E/S de dispositivos reconocidos
KERNEL OPTIONS
cat /proc/cmdline Opciones del ncleo dadas en tiempo de arranque
FILESYSTEMS
cat /proc/filesystems Tipos de sistemas de archivos reconocidos por Linux. 'nodev' indica que no corresponde a ningn dispositivo fsico. 7
SYSTEM MEMORY
cat /proc/meminfo Informacin de gestin de la memoria del sistema
Tpico 101: Hardware & Arquitectura Listado de todos los dispositivos PCI y AGP encontrados en el bus por el ncleo. Informacin del ncleo cmdline Parmetros pasados al ncleo durante el arranque. filesystems Lista de sistemas de archivos conocidos por el ncleo (compilados o cargados como mdulos). meminfo Informacin sobre el uso de la memoria disponible en el sistema modules Lista de modulos cargados mounts Lista de sistemas de archivo montados. Tambin se muestran aquellos que hayan sido montados con la opcin -n y no aparecen en /etc/mtab ni en la salida de la orden df(1). version Versin del ncleo. Otros directorios importantes en /proc bus/ Informacin sobre los sistemas de bus presentes en el sistema ide/ Informacin sobre los controladores y dispositivos IDE scsi/ Informacin sobre los controladores y dispositivos SCSI net/ Informacin sobre aspectos de la red como la tabla ARP tabla de rutas, , dispositivos de red, etc. sys/ Contiene varios archivos y directorios que corresponden a variables del ncleo. Algunas pueden ser modificables directamente o va sysctl(8).
Tpico 101: Hardware & Arquitectura Lee el archivo de configuracin PnP y configura el dispositivo de acuerdo a ello. Proceso manual: 1. Recolectar los posibles valores de configuracin de las tarjetas PnP Examina las . direcciones 0x0273 a 0x03f3 pnpdump > /etc/isapnp.conf 2. Editar el archivo y activar los valores de configuracin deseados de cada tarjeta PnP vi /etc/isapnp.conf 3. Configurar las tarjetas PnP segn /etc/isapnp.conf. Debe ser hecho durante el arranque. isapnp /etc/isapnp.conf Use esta orden bajo Red Hat/SuSE isapnp tools /etc/isapnp.conf Use esta orden bajo Debian Observe lo siguiente en el paso 2 mientras edita el archivo /etc/isapnp.conf: IO ADDRESS: Primera direccin base de E/S posible: Menor direccin base de E/S 0x0240 Ultima direccin base de E/S posible: Mayor direccin base de E/S 0x03e0 Tamao del bloque de direcciones: Nmero de direcciones de E/S requeridas: 32 Vea las direcciones de E/S ocupados en el sistema: cat /proc/ioports Haga una lista de las posibles direcciones de E/S para esta tarjeta. (1era direccin base de E/S posible + Tamao del bloque de direcciones) etc ej. 240, 260, 280, 2A0, 2c0, ..., ..., 3e0 Elija una direccin disponible, escrbalo en la siguiente lnea y descomente la lnea: (IO 0 (BASE 0x340)) IRQ: Proceda de la misma manera para las direcciones IRQ y al terminar descomente la lnea: (INT 0 (IRQ xx (MODE +E))) (xx=chosen IRQ) Finalmente active la tarjeta y descomente la lnea: (ACT Y)
10
Propsito de la BIOS
La BIOS es el programa intermedio (en ROM) entre la arquitectura de hardware (placa o tarjeta madre) y el sistema operativo. Linux trata directamente con algn hardware (ej. Controlador IDE) por velocidad y mejor control.
11
Configuracin de perifricos
Desactivar cualquier dispositivo no utilizado. Ej. Puertos COM, ratn, canales IDE si se est usando SCSI, etc.
12
Modems
Verifique la lista de compatibilidad de hardware de su distribucin. Una buena fuente sobre informacin de hardware es el Hardware-HOWTO Los modems normales (compatibles con Hayes) son controlados con ordenes AT Preste atencin a los denominados WinModems estos no son modems hardware reales. Ellos usan controladores Windows para simular el conjunto de rdenes AT. Esta seccin no se aplica a WinModems. Ms informacin al respecto en www.linmodems.org
Tarjetas de Sonido
LPI se concentra en la tcnica de sonido OSS. (Open Sound System) Cada tarjeta de sonido necesita su propio mdulo de ncleo. Programa para configuracin de tarjeta de sonido (RedHat y otros): sndconfig Examina todos los posibles puertos de E/S y se maneja por menues. El puerto estndar de E/S para una tarjeta de sonido es: 0x220 Maneja bastante bien tarjetas PnP y antiguas ISA.
13
Notas
SCSI = Small Computer System Interface Propsito: Aprender a configurar los dispositivos SCSI con respecto a la BIOS, SCSI-ID y al arranque. Uso de SCSI: Sigue en la industria de servidores, ofrece confiabilidad, resistencia, caractersticas de enchufado-en-caliente (Hot-Plug). Herramientas: SCSI-ID, /proc/scsi, scsi_info
Arquitectura SCSI
Nmero de dispositivos con SCSI, incluyendo el controlador SCSI mismo: Standard (SCSI 8 bits) : 8 = 7 dispositivos + 1 controlador SCSI Wide (SCSI 16 bits) : 16 = 15 dispositivos + 1 controlador SCSI
Tipos de SCSI
Standard (SCSI-1): 8 Devices 10 MHz Mximo SCSI-2, FAST-SCSI-2, Wide-SCSI-2 (cable de 68 alambres, bus de 16 bits): Rpido, mejor conjunto de rdenes 14
Tpico 101: Hardware & Arquitectura SCSI-3 aun ms rpido pero sigue en desarrollo, no es importante para LPI
SCSI en Linux
/proc/scsi directorio que contiene todos los dispositivos SCSI como sub-directorios. Cada sub-directorio contiene archivos nombrados con el nmero de bus SCSI (0,1,2) Estos archivos contienen una lista de los dispositivos conectados a este bus. 15
Tpico 101: Hardware & Arquitectura El archivo /proc/scsi/scsi contiene la lista de todos los dispositivos SCSI encontrados en el sistema.
16
Herramientas
/proc/dma /proc/interrupts /proc/ioports /proc/pci Archivos de informacin pnpdump isapnp lspci Programas
PCI
Los dispositivos PCI son identificados por un nico valor ID tal como una direccin MAC en las tarjetas de red. Linux almacena estos PCI IDs en los siguientes archivos: /usr/share/pci.ids SuSE /usr/share/hwdata/pci.ids RedHat & Debian /usr/share/mics/pci.ids Old Debian distributions update-pciids esta orden actualiza la lista desde Internet en /usr/share/mics/pci.ids.new o su equivalente segun la distribucin. 17
Tpico 101: Hardware & Arquitectura Linux soporta dispositivos PCI (Bus ID=00) completamente sin necesidad de configuraciones manuales. AGP es un bus PCI (Bus ID=01) separado, reservado para Tarjetas Grficas, teniendo slo una ranura de expansin (slot). Ha sido creado para no perturbar la transferencia de datos entre el chip grfico y el CPU. El sistema de Bus PCI usa un esquema de direcciones similar al de SCSI: No_Bus:No_Slot:No_Funcin(No_Dispositivo) lspci es utilizado para obtener un listado de todos los dispositivos PCI del sistema. lspci encuentra informacin de los fabricantes en el archivo /usr/share/pci.ids. lspci -n muestra el cdigo numrico de los fabricantes en lugar de tomar las descripciones del archivo pci.ids. Los ncleos posteriores a la versin 2.1.82 tienen ms informacin sobre los dispositivos en el Bus PCI en el archivo /proc/pci. Los puertos seriales conocidos como COM1, COM2, etc. in DOS, son conocidos en Linux como: ttyS0,ttyS1, etc. Los puertos paralelos conocidos como lpt1, lpt2 en DOS, son conocidos en Linux como: lp0, lp1 etc
18
Herramientas
/proc/dma /proc/ioports /proc/interrupts setserial(8) setserial es parte del paquete setserial en SuSE, RedHat & Debian minicom es uno de los programas para terminales seriales en Linux. setserial /dev/ttySx setserial /dev/cuax Muestra la configuracin de el puerto serial, donde x es el nmero de puerto setserial /dev/ttySx <parametros> Configura el puerto serial de acuerdo a los parmetros indicados. Los parmetros son: port <No_puerto> irq <IRQ> uart <UART_Tipo> Nmero de puerto E/S Nmero de IRQ UART (Universal Asynchronous Receiver Transmitter) Valores posibles son: none, 8250, 16450, 16550, 16550, 16550A, 16650V2, 16654, 16750, 16850, 16950, 16954. none=Desactiva el dispositivo
Muchas aplicaciones antiguas slo conocen hasta 38400 Baudios. Para permitir velocidades ms rpidas aun cuando la aplicacin solicita por 38400 Baudios, setserial cuenta con parmetros extra que configuran banderas del hardware que traducen las solicitudes de 38.4Kb por las aplicaciones a velocidades superiores en el chip UART. Parmetro spd_normal spd_hi Velocidad solicitada por la Aplicacin 38.4Kb 38.4Kb Velocidad UART real 38.4Kb 57.6Kb
19
Tpico 101: Hardware & Arquitectura Parmetro spd_vhi spd_shi spd_warp Velocidad solicitada por la Aplicacin 38.4Kb 38.4Kb 38.4Kb Velocidad UART real 115Kb 230Kb 460Kb
20
Resumen
El mdulos USB principal es usbcore (aunque algunas veces puede incluido en el ncleo) Hay dos tipos de controladores USB: OHCI Open Host Controller Interface (Compaq) UHCI Universal Host Controller Interface (Intel) Todos los dispositivos USB son compatibles con ambos OHCI y UHCI. El uso del juego de chips USB es segn el fabricante de la placa base: OHCI Compaq Ali NEC Opti Chipset lspci less /proc/pci Para reconocer el tipo de controladores USB: Los mdulos USB posibles de usar son: ohci.o, uhci.o or ehci-hcd.o Para cargar el mdulo USB durante el arranque, aada esta entrada a /etc/modules.conf: alias usb uhci Tambin para cargar (post-install) otros submdulos, aada entradas como las siguientes a /etc/modules.conf: alias usb uhci UHCI Intel VIA EHCI (USB 2.0) Intel VIA NEC Philips
21
Tpico 101: Hardware & Arquitectura post-install uhci modprobe printer post-install printer modprobe joydev post-install joydev modprobe hid
Despus de cargar el controlador (usb-ohci o usb-uhci) el contenido de este directorio crece, para incluir directorios de nombre numrico por cada dispositivo USB (001,002 etc). Los archivos dentro de estos directorios estn en formato formato binario.
hid.o (HID = Human Interface Device) e input.o (Input Core) son slo para teclados USB (usbkbd.o), ratones USB (usbmouse.o) o palanca de juegos USB (Joystick), en otros casos no son necesarios. Otros mdulos USB son: Impresoras : printer.o usb-storage.o Almacenamiento:
22
Tpico 101: Hardware & Arquitectura When printer.o is loaded it creates devices /dev/usb/lp0 ..lp1.
hotplug
Durante el arranque el demonio hotplug es iniciado por medio del script /etc/init.d/hotplug. Cuando un nuevo dispositivo es insertado, el ncleo lo percibe y entonces pasa el nombre de un agente como parmetro al demonio listado en el archivo: /proc/sys/kernel/hotplug (normalmente /sbin/hotplug). El ncleo llena entonces la variable de entorno DEVICES con la informacin sobre el dispositivo, y la variable ACTION indicando si el dispositivo fue conectado o desconectado. El demonio hotplug inicia el script agente adecuado. El script agente lee el contenido de las variables DEVICES y ACTION as como tambin (posiblemente) otras variables provistas por el ncleo. Usa tambin el programa usbmodules para indagar sobre el dispositivo insertado. Los 'script agentes' especficos son: USB PCMCIA Firewire (IEEE1394) Network system /etc/hotplug/usb.agent /etc/hotplug/pci.agent (via a bridge) /etc/hotplug/ieee1394.agent /etc/hotplug/net.agent 23
Archivos involucrados: /lib/modules/*/modules.*map /proc/sys/kernel/hotplug /sbin/hotplug /etc/hotplug/* /etc/hotplug/NAME.agent /etc/hotplug/NAME* /etc/hotplug/NAME/DRIVER /etc/hotplug/usb/DRIVER.usermap /etc/init.d/hotplug Salida de la orden depmod Indica la ruta del programa 'hotplug' Programa hotplug predeterminado Archivos de 'hotplug' Agentes especficos del subsistema 'hotplug' Archivos especficos del subsistema, para agentes Scripts de configuracin de dispositivo, invocados por los agentes Datos de depmod para controladores de usuario (user-mode drivers) Script del sistema para el servicio hotplug. Tambin usado durante el arranque para cargar y configurar dispositivos 'hot-plug' que ya han sido conectados al sistema.
usbmgr necesita que se reunan las siguientes condiciones: El ncleo debe ser capz de manejar USB (usbcore) USBDEVFS deber ser soportado Los mdules necesarios deben estar disponibles.
24
Disear la organizacin del disco............................................................5 Instalar un gestor de arranque................................................................1 Construir e instalar programas desde cdigo fuente..............................5 Gestionar bibliotecas compartidas..........................................................3 Gestin de paquetes en Debian (DEB)....................................................8 Gestin de paquetes en Red Hat (RPM)..................................................8
Resmen
TODO
25
26
Tpico 102: Instalacin de Linux & Gestin de paquetes /var/run /var/spool /var/tmp PIDs de demonios y programas (si son necesarios). Colas de impresora, correo, etc. Espacio para archivos temporales. Permiso de escritura para todos los usuarios.
Particiones swap
Creado y manejado por: fdisk, mkswap, swapon, swapoff, /etc/fstab Creando un archivo swap (64MiB): dd if=/dev/zero of=/ruta/al/archivoswap bs=1024 count=64000 mkswap /ruta/al/archivoswap 64000 swapon [-p 42] /ruta/al/archivoswap Entrada en /etc/fstab /ruta/al/archivoswap cat /proc/swaps none swap defaults Para ver todas las reas de swap (archivos y particiones)
27
Programa en el MBR o sector-de-arranque, carga el gestor de arranque desde el disco. (realiza un acceso directo al disco) Presenta el men y espera Inicia el sistema operativo seleccionado
LILO
/etc/lilo.conf /boot/boot.b /boot/boot-menu.b /boot/message /boot/boot-bmp.b /boot/map /sbin/lilo Archivo de configuracin Archivo del men de arranque Otros posibles elementos del men
Direccin fsica y tamao del archivo del ncleo. Programa que lee el archivo de configuracin y escribe la primera etapa del cargador al MBR. Usa funciones de la BIOS y crea el archivo /boot/map
Nota: Despus de cualquier cambios al archivos /etc/lilo.conf o cualquier modificacin de la ubicacin o tamao de cualquier archivo en el directorio /boot lilo DEBE ser ejecutado nuevamente. lilo -u Restaura el gestore de arranque previo en el MBR (ej. Windows MBR)
28
Tpico 102: Instalacin de Linux & Gestin de paquetes LI La segunda parte de LILO es cargada pero es probablemente invlida. Razn: lilo no fue probablemente ejecutado despus de realizar cambios en /boot o en el archivo de configuracin. La segunda parte de LILO es cargada pero el contenido de /boot/map es incorrecto. Razn: Error del medio o geometra incorrecta del medio. La segunda parte de LILO es cargada pero hay basura. Razn: el archivo /boot/boot.b fue movido o cambiado. La segunda parte de LILO es cargada pero pero el archivo /boot/map tiene basura. Razn: el archivo /boot/map fue movido o cambiado. Todo est bien. LILO fue cargado adecuadamente.
LIL
LIL? LILLILO
Opciones en /etc/lilo.conf
Opciones generales append="reboot=warm" boot=/dev/hda lba32 No revisar la RAM cuando reinicia. Ubicacin donde la etapa 1 de LILO (part1) debe ser escrita. hda=MBR, hda1=Sector de arranque de hda1 El disco tiene ms de 1024 cilindros fsicamente y LILO debera usar modo LBA. Slo es vlido si la BIOS soporta LBA32 Mensage cargado en el MBR con part1 de lilo.conf LILO esperar que el usuario haga su eleccin. Arrancar el sistema predeterminado cuando transcurran 300 = 30 segundos sin intervencin del usuario Ubiacin del ncleo a cargar. Particin que contiene el sistema de archivos raz '/' Ubicacin del archivo que se usa como sistema de archivos temporal en RAM (Ramdrive). Nombre del item en el men. Ubiacin de un S.O. no Linux. Va a esa particin y carga lo que encuentra en el sector de arranque. Normalmente utilizado para arrancar sistemas Windows.
Secciones individuales del S.O. image = /boot/bzlinuz root = /dev/hda2 initrd = /boot/initrd label = linux other = /dev/hda3
29
timeout=10 splashimage=(hd0,0)/boot/grub/splash.xpm .gz Secciones individuales del S.O. title linux root (hd0,0) kernel /boot/bzlinuz ro root=/dev/hda1
makeactive
Para arrancar desde un CD/Disquete/HD y utilizar el sistema de archivos raz de otro Linux (ej. /dev/hda4) como su propia raz (/) se debe usar el pmetro de ncleo: root=/dev/hda4
30
Tpico 102: Instalacin de Linux & Gestin de paquetes fssys_stage1_5 carga el archivo stage2 stage2 carga el archivo del men menu.lst Despus de que la eleccin de un tem del menu es hecha, stage2 carga el ncleo de Linux (vmlinuz) y posiblemente el archivo de Ramdrive initrd
31
Desempaquetando archivos
Archivos comprimidos tar (un nuevo directorio va ser creado en el directorio destino): cd <directorio-destino> tar vxzf <archivo>.tar.gz tar vxjf <archivo>.tar.bz2 Archivos tar (empaquetados): tar fcx tarfile.tar Archivos comprimidos: gunzip <archivo>.gz bunzip2 <archivo>.bz2 bzip2 -d <archivo>.bz2 --> --> --> archivo (el <archivo>.gz es eliminado) archivo (el <archivo>.bz2 es eliminado) archivo (el <archivo>.bz2 es eliminado) or or zcat <archivo>.tar.gz | tar xvf bzcat <archivo>.tar.bz2 | tar xvf -
Empaquetando archivos
Creando archivos tar empaquetados: tar vcf nuevo-archivo.tar /dir/a/empaquetar Creando archivos tar empaquetados y comprimidos: tar vczf nuevo-archivo.tar.gz Comprimiendo archivos: gzip archivo bzip2 archivo ----> ----> <archivo>.gz <archivo>.bz2 (el <archivo> es eliminado) (el <archivo> es eliminado) /dir/a/empaquetar tar vcjf nuevo-archivo.tar.bz2 /dir/a/empaquetar
Proceso de compilacin
cd <directorio-de-codigo-fuente> ./configure Este script estudia el entorno del sistema y crea el archivo Makefile make o make all Lee el archivo Makefile e inicia la compilacin de los fuentes. make clean Elimina todos los archivos binarios que resultaron de la compilacin de modo que la prxima ejecucin de make empiece en limpio. make install Instala los archivos compilados y posiblemente otros archivos en el sistema. Normalmente esto es slo posible ejecutar como root. Nota: make examina las marcas de tiempo de los varios archivos involucrados para determinar que archivos binarios deberan ser o no recompilados. Observa si los archivos del cdigo fuente han sido modificados desde la ltima compilacin.
33
Tpico 102: Instalacin de Linux & Gestin de paquetes Modificando el archivo Makefile manualmente Cambios al archivo Makefile deberan ser hechos normalmente para ajustar las rutas de directorio donde se instalarn los programas. Estos parmetros modificables se ubican normalmente al principio del archivo Makefile. Se encuentran en el formato normal de asignacin de variables del intrprete de rdenes: variable=valor
34
Secuencia de eventos
bash le dice al ncleo que inicie un programa El ncleo inicia el Enlazador de Bibliotecas Dinmico (Dynamic Library Linker) ld.so ld.so busca todas las bibliotecas necesarias para el programa en el siguiente orden: Mira en la lista de rutas que aparecen en la variable de entorno LD_LIBRARY_PATH Mira en las rutas listadas en el cach de bibliotecla /etc/ld.so.cache Mira en los directorios /lib and /usr/lib ld.so se carga a si mismo ld.so carga el programa en memoria y pasa el control al programa
ldd /path/to/program Lista todas las bibliotecas que un programa necesita /lib /usr/lib /usr/local/lib ldconfig
35
36
Sintaxis
rpm accin [opciones] nombre-de-paquete[.rpm]
37
Accin
Formato corto -i Formato largo --install Descripcin Instala el paquete. Trabaja slo cuando no hay otra de versin anterior del paquete previamente instalada. Actualiza el paquete. Trabaja como instalar pero tambin borra una versin anterior del paquete. Actualiza el paquete. Trabaja slo cuando una versin anterior del paquete est previamente instalada. Desinstala (borra) el paquete.
-U
--upgrade
-F
--freshen
-e
--erase
Optiones de instalacin
Formato corto Formato largo --nodeps --noscripts --test --excludedocs --replacepkgs --replacefiles --oldpackage --force Descripcin Instala sin verificar dependencias. No se corrern los scripts de Pre/PostInstalacin. No instala, solamente simula la instalacin. Instala pero sin documentacin. Instala todo aun si algunos paquetes estn ya instalados. Sobrescribe archivos previamente instalados si estos existen. Permite instalar una versin anterior (downgrading) del paquete. Instala sin importar que. Puede ser visto lo mismo que: --replacepkgs --replacefiles --oldpackage
Opciones de desinstalacin
Formato corto Formato largo --nodeps --noscripts --test Descripcin Desinstala sin verificar dependencias. No se corrern los scripts de Pre/PostInstalacin. No desinstala, solamente simula la desinstalacin.
38
Tpico 102: Instalacin de Linux & Gestin de paquetes Formato corto Formato largo --allmatches Descripcin Desinstala todos los paquetes cuyos nombres coinciden con el patrn. En este caso no se van a producir errores coincide con 2 o ms paquetes.
Consulta de paquetes
Use la opcin -q o --query ms otras opciones de consulta listadas abajo. Si la consulta es hecha sobre un paquete instalado, el nombre del paquete se indica slo sin necesidad del nmero de versin o revisin o la extensin .rpm. Si la consulta es hecha sobre un paquete en forma de archivo RPM, entonces el nombre del archivo RPM incluyendo la extensin .rpm debe ser dado como nombre del paquete. Formato corto -q[optiones] i l c d Formato largo --query --info --list --configfiles --docfiles --provides R --requires --changelog --scripts --dump --filesbypkg --last --state Descripcin Pregunta si el paquete de nombre indicado est instalado (sin .rpm en el nombre) Informacin de la cabecera del paquete. Lista de todos los archivos. Lista de los archivos de configuracin. Lista de los archivos de documentacin. Programas/Bibliotecas provistas por el paquete. Lista los archivos de los cuales este paquete depende. Muestra el registro de cambios (Changelog) en el paquete. Muestra los 4 scripts de Instalacin/Desinstalacin. Lista de todos los archivos y sus atributos. Igual que --list pero aadiendo el nombre de paquete por lnea Fecha de la ltima instalacin del paquete. Como --list pero indica el estado de los archivos: normal, no instalado o remplazado Extrae temes especficos de informacin de la cabecera. Ej. rpm -q --qf %{Description} apache Muestra slo la parte que corresponde a la descripcin del paquete. Ej. rpm -qa --qf "%{NAME}\n"|sort|less Lista slo los nombres de todos los paquetes instalados.
39
Tpico 102: Instalacin de Linux & Gestin de paquetes Formato corto Formato largo --querytags Descripcin Lista los posibles QUERYTAGs que se pueden utilizar en --queryformat.
--whatprovides
g group
--group grupo
Ejemplos
rpm -qil NombrePaquete Informacin del paquete y la lista de los archivos instalados del paquete. rpm -qa | sort | less Muestra todos los paquetes instalados rpm -qai | grep -2 "^Release" | less Igual que el anterior pero muestra informacin ms completa. rpm -hiv Paquete.rpm Instala el paquete y muestra una barra de progreso (#) rpm -hiv --replacefiles Paquete.rpm
40
Tpico 102: Instalacin de Linux & Gestin de paquetes Instala sobre el paquete existente mostrando una barra de progreso (hash #) rpm -hUv Paquete.rpm Atualiza mostrando una barra de progreso (hash #) rpm -hUv --force Paquete.rpm Actualiza y sobrescribe el paquete existente aun si hay un conflicto o problema de dependencias. rpm -qf /algun/archivo Dice a cual paquete pertenece este archivo (use una ruta absoluta) rpm -qdf /algun/archivo Dice que archivos de documentacin vienen con este paquete (use una ruta absoluta)
Ejemplos avanzados
rpm -qa --qf "%{NAME} : %{SUMMARY}\n" | sort | less Para mostrar una lista de todos los paquetes previamente instalados junto a un resumen. rpm -qai | awk -F: ' /^Name|^Version/ {print $1,$2} /^Version/ \ {print ""}' | cut -b-30 | grep -1 $1 Para buscar paquetes instalados previamente por un patrn dado: rpm -qp --filesbypkg *.rpm | grep filename Para buscar entre archivos de paquetes RPM no instalados por un nombre de archivos dado.
Tpico 102: Instalacin de Linux & Gestin de paquetes Significado del campo de estado: . S U M G 5 T L D OK, todo en orden El tamao del archivo ha sido cambiado El propietario (dueo) del archivo ha sido cambiado Los derechos o permisos de acceso han sido cambiados El grupo del archivo ha sido cambiado La cifra de comprobacin MD5 no coincide Las marcas de tiempo han sido cambiadas Fallo en la llamada a la funcin del sistema readlink Los nmero Mayor/Menor del archivo de dispositivo ha sido cambiado
Significado del tipo de archivo <espacio> c ? Archivo normal Archivo de configuracin No se pudo revisar (posiblemente debido a una falla de acceso para lectura)
42
MISCELLANEOUS
rpm rpm rpm rpm {--initdb|--rebuilddb} {--querytags|--showrc} {--addsign|--resign} PACKAGE_FILE ... {--setperms|--setugids} PACKAGE_NAME ...
SELECT-OPTIONS
[PACKAGE_NAME] [-a,--all] [-f,--file FILE] [-g,--group GROUP] [-p,--package PACK-AGE_FILE] [--querybynumber NUMBER] [--triggeredby PACKAGE_NAME] [--whatprovides CAPABILITY] [--whatrequires CAPABILITY]
QUERY-OPTIONS
[--changelog] [--filesbypkg] [--provides] [--scripts] [-c,--configfiles] [-d,--docfiles] [--dump] [-i,--info] [--last] [-l,--list] [--qf,--queryformat QUERYFMT] [-R,--requires] [-s,--state] [--triggers,--triggerscripts]
INSTALL-OPTIONS
[--allfiles] [--force] [--ignoreos] [--noorder] [--percent] [--repackage] [--badreloc] [--excludepath OLDPATH] [--excludedocs] [-h,--hash] [--ignoresize] [--ignorearch] [--includedocs] [--justdb] [--nodeps] [--noscripts] [--notriggers] [--oldpackage] [--prefix NEWPATH] [--relocate OLDPATH=NEWPATH] [--replacefiles][--replacepkgs] [--test]
Nota: Las opciones para construir paquetes no se han includo aqu. Vea la pgina del manual para mayor informacin. Otra fuente de informacin son: http://www.rpm.org Los programas kpackage, KpackViewer y kpm
43
Trabajo en la lnea de rdenes................................................................5 Procesar flujos de texto usando filtros....................................................6 Realizar gestin bsica de archivos........................................................3 Uso de flujos, redirigirlos y tuberas.......................................................5 Crear, monitorear, y terminar procesos..................................................5 Modificar la prioridad de ejecucin de procesos.....................................3 Buscar en archivos de texto usando expresiones regulares....................3 Realizar operaciones bsicas de edicin de archivos con vi....................1
Resmen
TODO
44
Tpico 103: Ordenes GNU & Unix export variable[=valor] Define una variable de entorno
Base de datos con informacin del tipo de terminal /etc/termcap Archivo antiguo, sigue siendo utilizado por SuSE /etc/terminfo/* Nuevos archivos utilizados por Debian
Sustitucin de orden
`orden` Antigua sintaxis $(orden) nueva sintaxis Ejemplo: echo "Mi directorio actual es `pwd`" ls -la /lib/modules/$(uname -r)/*
Tpico 103: Ordenes GNU & Unix set -o history $HISTFILE $HISTFILESIZE $HISTSIZE history history 10 fc -l -10 fc -l patrn <Ctrl>-r history -c !! !n !-n !cadena !? cadena <Ctrl>-p <Ctrl>-n <Alt>-< <Alt>-> Activa la funcin de historia de rdenes Variable que contiene el nombre del archivo de historia. Normalmente es ~/.bash_history Variable que contiene el mximo nmero rdenes que el archivo de historia puede guardar. Valor predeterminado 500 Variable que contiene el mximo nmero de rdenes en la historia. Valor predeterminado 500 Muestra la historia de rdenes completa Muestra las ltimas 10 lneas de la historia de rdenes Muestra las ltimas 10 lneas de la historia de rdenes Busca en la historia el patrn y muestra resultado Bsqueda en sentido inverso en la historia Borra la historia de rdenes Repite la ltima orden Repite la orden de la lnea n en la historia Repite la orden n lneas atrs en la historia Repite la ms reciente orden que empieza con cadena Repite la ms reciente orden que contiene la cadena Lnea anterior en la historia (tambin flecha del cursor arriba) Lnea siguiente en la historia (tambin flecha del cursor abajo) Ir al principio de la historia Ir al final de la historia
47
man e info
man [n] orden Invoca la pgina del manual de la orden indicada. n representa la seccin de las pgina del manual (1 a 9). Secciones posibles: 1 2 3 4 5 6 7 8 9 Programas ejecutables u rdenes Llamadas al sistema (funciones realizadas por el ncleo) Llamadas a bibliotecas (funciones provistas por bibliotecas de programas) Archivos especiales (usualmente encontrados en /dev) Convenciones y formatos de archivos. Ej. /etc/passwd Juegos Miscelneos (incluyendo macros, protocolos de red, cdigo de caracteres), Ej. man(7), groff(7) Ordenes de Administracin del Sistema (usualmente slo para root) Rutinas del ncleo [no estndar]
48
Lista de rdenes
cut expand unexpand fmt head join nl od paste pr split cat tac tail tr Extrae columnas/campos de archivos de texto Expande Tabulaciones a Espacios en archivos de texto Opuesto a expand Reformatea prrafos en archivos de texto Muestras las primeras n lneas de un archivo de texto Une lneas de texto por campos comunes en archivos de texto Numera lneas en archivos de texto Muestra el contenido del archivo en Octal, Hexadecimal o Decimal. Escribe una a una las lneas correspondientes a 2 archivos de texto Formatea archivos de texto de forma adecuada para impresin Divide archivos grandes en mltiples archivos pequeos Concatena archivos / Muestra el contenido de archivos Muestra el contenido de archivos de manera invertida (de fin a inicio) Muestra las ltimas n lneas de un archivo de texto Convierte o borra caracteres
49
Tpico 103: Ordenes GNU & Unix wc xargs sed sort grep more less uniq Cuenta el nmero de caracteres, palabras y lneas en un archivo texto Extiende el resultado de una orden en una secuencia de argumentos Editor de flujos de texto Ordena el contenido en archivos de texto Filtra/extrae lneas de un archivos de texto Muestra el contenido de archivos por pgina Muestra el contenido de archivos por lneas (adelante/atrs) Descarta lneas sucesivas idnticas
Ejemplos de uso
cut -dx -fy
cut -d: -f1,6 /etc/passwd (extrae campos 1 y 6) Extrae columnas del archivo: campo(y), separador(x)
expand
expand /etc/init.d/at > ~/atnew Expande (convierte) TABs a espacios en archivos de texto
unexpand
unexpand -a /etc/services > ~/serv ; vi ~/serv Opuesto de expand: Convierte espacios a TABs en archivos de texto
fmt
fmt -w50 /usr/share/doc/packages/apache/ABOUT_APACHE Reformatea el archivo de texto. Cada lnea debe tener al menos un espacio.
head [-|+][n]
head -40 /etc/services Muestra las primeras 40 lneas del archivo. Si no se indica la cantidad de modo predeterminado es 10.
join
join -t: -11 -21 /etc/passwd /etc/shadow Une lneas de datos en archivos con campos comunes
nl
nl -ba /etc/inittab
50
Tpico 103: Ordenes GNU & Unix Enumera las lneas vacas tambin Opciones predeterminadas: v1 -i1 -l1 -sTAB -w6 -nrn -hn -bt -fn Ejemplos nl -s" - " /etc/services Enumera las lneas agregando " - " despus del nmero de lnea nl -bp"^#" /etc/inittab Enumera slo las lneas que empiezan con '#'
od -bih -t x
Muestra el contenido del archivo en Octal (-b), Decimal(-i) o Hexadecimal.(-h). Ejemplo: od -h /bin/ping x = Tipo de formato -a igual que -t a, selecciona caracteres -b igual que -t oC, selecciona bytes en octal -c igual que -t c, selecciona caracteres ASCII o '\' escapes -d igual que -t u2, selecciona decimales cortos sin signo -f igual que -t fF, selecciona nmeros flotantes -h igual que -t x2, selecciona hexadecimal cortos -i igual que -t d2, selecciona decimal cortos -l igual que -t d4, selecciona decimal largos -o igual que -t o2, selecciona octal cortos -x igual as -t x2, selecciona hexadecimal cortos Nota: -x no es lo mismo que -tx
paste
Ejemplo 1: 51
Tpico 103: Ordenes GNU & Unix paste /etc/passwd /etc/shadow Ejemplo 2: cut -d: -f1 /etc/passwd > file1 cut -d: -f3 /etc/passwd > file2 paste -d: file1 file2 > file3
pr
pr /etc/services | less
cat
Ejemplo 1: cat -n /etc/hosts Muestra todas las lneas del archivo enumerndolas (-n) Ejemplo 2: cat -b /etc/hosts Enumera slo las lneas no vacas
tac
tac /etc/passwd Muestra el contenido del archivo desde la ltima lnea a la primera, es decir al revs. Compare con: cat /etc/passwd
tail [-|+][n]
Ejemplo 1: 52
Tpico 103: Ordenes GNU & Unix tail -30 /etc/services Muestra las ltimas 30 lneas. Si no se indica n de modo predeterminado es 10 Ejemplo 2: tail +100 /etc/services Omite las primeras 100 lneas y muestra el resto del archivo hasta el final Ejemplo 3: tail -fs5 --retry /var/log/httpd/error_log Lee las ltimas 10 lneas del archivo cada 5 segundos y se mantiene reintentando an si el archivo no est disponible.
tr -d
tr "a-z" "A-Z" < /etc/motd Convierte letras minsculas a maysculas (a-z A-Z) tr -d "#" < /etc/services | less Borra todos los caracteres #
wc -l|-w|-c
wc /etc/motd Sin opciones muestra el nmero de lneas (-l), el nmero de palabras (-w) y el nmero de caracteres (-c)
xargs
Lee lneas de texto desde una tubera y las convierte en parmetros para pasarlos a una orden especfica, como mximo 64kb por orden lanzada. find /etc -name *.conf | xargs cat > /tmp/confs Encuentra todos los archivos .conf en /etc y acumula sus contenidos en un solo archivo llamado /tmp/confs.
sed
sed 's/#/;-/g' /etc/services Busca el caracter # y reemplaza todas sus ocurrencias (g: sustitucin global) por los caracteres ;sed '12,$s/Versions/Revisions/g' Empieza la sustitucin global(g) en la lnea 12 hasta el final del archivo ($)
53
Tpico 103: Ordenes GNU & Unix Ordena numricamente(n) por tamao de archivo: campo nmero 5
grep [-virns]
Extrae todas las lneas de texto donde el patrn es [no es] encontrado grep -ins "^f.p.*SSL" /etc/services Muestra todas las lneas donde el patrn (ignorando maysculas/minsculas:-i) es encontrado con su nmero de lnea correspondiente (-n) y sin mensajes de error (-s). ps -ax | grep httpd | grep -v grep Muestra todas las instancias de procesos donde aparece httpd excluyendo (-v) la propia orden grep httpd
more
more -30 /etc/services Muestra el archivo de 30 en 30 lneas al presionar la barra espaciadora, muestra la siguiente lnea si se presiona Enter.
less
less -X +G /etc/services Ir al final de la lnea (+G) y dejar la pantalla tal como est (-X) cuando salga de less. less -phttps /etc/services Cargar el archivo e ir a la primera ocurrencia del patrn https
uniq
Filtra lneas consecutivas repetidas en un archivo rpm -qa --qf "%{LICENSE}\n" | sort | uniq | less o rpm -qa --qf "%{LICENSE}\n" | sort -u | less Muestra todos los tipos de licencias usadas por los paquetes instalados
awk -Fx
Herramienta avanzada de reconocimiento y procesamiento de patrones awk -F: '{ print $1,"\t- ", $3 }' /etc/passwd Toma como separador de campos ':' (x) e imprime los campos 1 y 3 separados por un tabulador (\t) seguido de un guin.
54
cd
cd /<directorio> Cambia al directorio utilizando la ruta absoluta cd <directorio> Cambia al directorio utilizando una ruta relativa cd ~foo Cambia al directorio de trabajo (home) del usuario foo
ls
ls [directorio|archivo] Lista el contenido del directorio o muestra informacin del archivo ls -lai /etc Listado en formato largo de los archivos en /etc, incluyendo nmero de nodos-i y archivos ocultos
cp
cp origen destino Copia archivos o directorios cp origen1 origen2 ... . Copia todos los archivos al directorio actual (.) cp /dev/null nuevoarchtemp Crea un nuevo archivo vaco 55
mv
mv origen destino Mueve o renombra archivos o directorios mv -f archivo1 archivo2 -f es la opcin predeterminada. Permite sobrescribir si el archivo2 ya existe mv -i archivo1 archivo2 Solicita confirmacin antes de sobrescribir
mkdir
Crea directorios. Opciones: -p|--parents Crea los directorios padres (ruta completa) necesarios, existan o no -m 755 Establece los permisos de acceso indicados
rmdir
Borra directorios. Opciones: -p|--parents Borra los directorio padre especificados en la lnea de rdenes. Los directorios padre deben estar vacos (no contener archivos).
touch
Cambia las marcas de tiempo (fecha y hora) de un archivo. Tambin puede ser utilizado para crear archivos vacos: touch archivo1
56
E/S Estndar
STDIN Descriptor de archivo 0. Los programas obtienen datos de entrada desde este archivo, al menos que se indique otra cosa. STDOUT Descriptor de archivo 1. Los programas envan datos de salida a este archivo, al menos que se indique otra cosa. STDERR Descriptor de archivo 2. Los programas envan mensajes de error a este archivo, al menos que se indique otra cosa.
Tuberas ('|')
(pipes en ingls) Enva la salida de la primera orden como entrada de la segunda orden. Nota: '|' redirige solamente STDOUT y NO STDERR prog1 2>&1 | prog2 Redirige STDOUT y STDERR
| xargs
Usa la salida de un programa como una lista de argumentos para otro programa [prog1] | xargs prog2 Lo mismo que: [prog2] $(prog1) La diferencia es que xargs entregar los argumentos en volmenes de 64kBytes a prog2 y ejecutar prog2 mltiples veces hasta que todos los argumentos (salida de prog1) sean utilizados. Ejemplo: 57
Tpico 103: Ordenes GNU & Unix find /etc -name "issue*" 2> /dev/null | xargs grep -c "Linux" Imprime una cuenta del nmero del nmero de veces que los archivos coincidentes con /etc/issue* contienen la palabra Linux. find devuelve una lista de archivos que coinciden con /etc/issue*, y xargs enva cada uno de estos nombres de archivo convertido en un parmetro para la orden grep. grep correr tantas veces como haya nombres de archivo que coincidan.
Redirigir
> >> << < 1> 2> &> 2>&1
>
Si el archivo existe lo sobrescribe, en otro caso crea un nuevo archivo, entonces procesa la orden, y luego escribe la STDOUT de la orden en el archivo. sed 's/#/;/g' archivo1 > archivo1 Ojo: Sobrescribe archivo1 con un archivo vaco !!! >nuevoarchivo Igual que: touch nuevoarchivo
>>
Similar a >, pero aade la salida al final del archivo si este existe
<
Redirige STDIN desde un archivo en lugar de leer desde el teclado. prog < archivo1 Lee su entrada desde archivo1.
<<
'documento-aqu' (documento en lnea) prog << EOF El texto va aqu... EOF prog toma como entrada el texto que aparece entre la primera marca EOF y la ltima marca EOF. La marca puede ser cualquier secuencia de caracteres. Ej.: END, DOC, XYZ
Combinando salidas
prog 2>&1 1>archivo prog &>archivo Ambas rdenes combinan STDOUT y STDERR para ser enviados a archivo 58
tee
programa | tee archivo Redirige la salida del programa a ambos STDOUT y archivo prog1 | tee archivo1 | prog2 | tee archivo2 | prog3 > archivo3 entrega el mismo resultado que las siguientes rdenes desconectadas: prog1 > archivo1 prog2 < archivo1 > archivo2 prog3 < archivo2 > archivo3
59
Tpico 103: Ordenes GNU & Unix top Muestra interactivamente los procesos 'ms hambrientos'
Terminacin de procesos
kill [-9] Matar brutalmente un proceso killall Mata muchos procesos que tienen el mismo nombre con una sola orden xkill Programa X para matar un proceso que es dueo de una ventana pkill Vea la pgina del manual de pkill skill [seal] [opcion] parametro Permite el envo de seales a mltiples procesos al mismo tiempo. Opciones & parmetros de skill: -t terminal Afecta a los procesos que estn corriendo en una terminal especfica. (ttyx o pts/x) -u nombre_usuario1 [nombre_usuario2....] Afecta a los procesos que pertenecen a uno o ms usuarios. -p PID1 [PID2 ...] Afecta a los procesos que tienen los PID(s). -c nombre_orden 61
Tpico 103: Ordenes GNU & Unix Afecta a los procesos cuya orden es igual a nombre_orden Ejemplos: skill -KILL -v pts/* Mata y lista (-v) todos los procesos en el nuevo estilo de dispositivos PTY skill -STOP viro leya davem Detiene procesos de 3 usuarios: viro, leya y davem
Tpico 103: Ordenes GNU & Unix wait Espera a que todos los trabajos en segundo plano se completen wait %n Espera a que el trabajo n en segundo plano se complete Ctrl-z Detiene el trabajo actual disown [opcin] [%n] Remueve el ltimo trabajo en segundo plano activo (+), o el trabajo %n. Opciones -a Remueve todos los trabajos en segundo plano -r Remueve solo los trabajos en ejecucin -h Remueve el trabajo activo (+) desde el intrprete slo cuando el intrprete es cerrado Formato de nombres de trabajo %%, %+ trabajo actual %n trabajo n %trabajo anterior %cadena trabajo cuyo nombre enpieza con cadena %?cadena trabajo cuyo nombre coincide en alguna parte o todo de cadena
63
64
65
66
Tpico 103: Ordenes GNU & Unix Accin Tipear i :sp Borrar & Porta papeles <Ctrl>w w x d dl dk d0 d$ c ch cj C dd 3dd yy nyy p,P Inicio de edicin (modo insercin) i, a, A o, O Comentarios Modo Insertar Divide la pantalla en 2 (ventanas) Cambia a otra ventana Borra el caracter sobre el cursor (Supr) Borra el caracter o lnea actual dependiendo de siguiente movimiento del cursor Borra el caracter a la derecha. Igual que x Borra la lnea actual & una lnea encima Borra desde el cursor hasta el comienzo de lnea. Borra desde el hasta el final de la lnea. Lo mismo que d pero empieza a insertar despus Borra 1 caracter atrs y cambia a modo insercin. Borra la lnea actual y cambia a modo insercin. Borra hasta el final de la lnea y cambia a modo insercin. Borra la lnea actual Borra 3 lneas (incluyendo la lnea actual) Copia la lnea actual al portapapeles Copia n lneas al portapapeles Pega desde el portapapeles antes (p) y despus (P) de la posicin actual del cursor Inserta texto antes, despues del cursor y al final de la lnea Abre una nueva lnea para insertar texto abajo, encima del Deshace la ltima accin en modo orden. Deshace la ltima accin en modo insercin. Guarda el archivo y sale del editor Guarda el archivo, Guarda el archivo(sobrescribe) Guarda el archivo como nombre (puede sobrescribir) Guarda el archivo como nombre (no sobrescribir) Muestra el archivo siguiente, anterior Muestra el nombre del archivo actual Abre un nuevo archivo si el actual ha sido guardado. Abre un nuevo archivo aun cuando el actual no haya sido guardado. Lee e inserta el contenido de archivo en la posicin actual del cursor Ejecuta en un shell la instruccin orden (orden) y vuelve a la edicin del documento.
Deshacer acciones u, <Ctrl>r <Alt>u Guardar/cambiar :wq :x ZZ archivo :w :w! :w! nombre :x nombre :n :f :e :N archivo
Abrir/Leer/Salir
67
Tpico 103: Ordenes GNU & Unix Accin Tipear :e! :q! :1,$s/patrn /remplazo/g :rango! orden_de_shell Comentarios Abre la ltima versin guardada de este archivo Salir sin guardar Igual que en sed Ejecuta el rango de texto a travz de la rden de shell (filtro) y remplaza el original con los resultados.
68
Crear particiones y sistemas de archivos................................................3 Mantener la integridad de los sistemas de archivos...............................3 Controlar el montar y desmontar sistemas de archivos..........................3 Gestionar cuotas de disco.......................................................................3 Usar permisos para controlar el acceso a archivos.................................5 Gestionar propiedad de archivos.............................................................1 Crear y cambiar enlaces rgidos y simblicos.........................................1 Buscar archivos del sistema y colocar en su ubicacin correcta.............5
Resmen
I-nodos
A fixed number of inodes are created when a filesystem is created depending on the size of the hard disk. Directories are files (type 'd') containing filenames and their respective inodes. Storage element on disk are called clusters under MSDOS, and called blocks underLinux The normal size of blocks is1024 Bytes Other possible sizes are512, 1024 & 2048 Bytes Each Linux filesystem partition contains: 1 Boot block 1 SuperBlock inodes area Data area
69
EXT2 Filesystem
The main difference between other filesystems and the EXT2 is the content of the inodes which are slightly different to accommodate future expansion and special features. Content of EXT2 inodes: permissions Nr. of Hard links size modification time(mtime) deletion time(dtime) flags(attributes) file ACL fragment fr. size frag. nr addr. 1. block data 3. block data 5. block data 7. block data 9. block data 11. block data simple indirect triple indirect reserved owner(UID) group(GID) properties change time(ctime) access time(atime) blockcount file version (NFS) dir ACL reserved 2. block data 4. block data 6. block data 8. block data 10. block data 12. block data double indirect reserved reserved
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS Useful are: Append (+a) Allows only to append to it via redirection(>>) Immutable (+i) Not changeable, no new hardlinks, not deletable Safe-delete (+s) Fills file with '0s' before deleting it. chattr attribute filename Changes the file's attributes. Root only chattr +i file Turns attribute i ON chattr -i file Turns attribute i OFF lsattr filename Lists a file's attributes File Version Entry: Can be used by NFS server. File ACL and Dir ACL: (Access Control List) for better access control. Support for fragmented files 12 Direct Block Addresses instead of 10 (standard) The Superblock has multiple backups of itself at the start of some block groups. I found between 6 to 10 copies (backups) in 3 to 10 GB Partitions Ext2 superblock has extra entries: Valid-Flag Entry: if ON means the filesystem was not unmounted properly. e2fsck uses this flag to know if it should do a full check. e2fsck -f forces the full check. Max-Mounts before full check and mount-count Entries: Used by e2fsck. If mountcount=Max-Mounts before full check then e2fsck does a full check at boot time. Percent of full partition space reserved for root Entry: Normally 5%. tune2fs can manipulate these above superblock entries. Warning: Partition should NOT be mounted as ReadWrite if changing any of these entries.
Journaling Filesystems
EXT3: Reiserfs: Xfs: Is an EXT2 filesystem with a journal file and journalling functions. Stores a report of all transactions bigger than 1 block. Up to 10 times faster than EXT3 when reading. Ported from IRIX system. Meant for handling very large files. Max 9,000 Peta Bytes. (9 mega mega mega bytes!) 71
Notes
Max number of Primary partitions per hard disks: 4 Max number of extended partitions per hard disk: 1 Maximum number of logical partitions per hard disk: 11 Partitions names: hda----IDE-Ctrl1------hdb master slave hda1 (pri/ext) hda2 (pri/ext) hda3 (pri/ext) hda4 (pri/ext) hda5 (logical) hda6 (logical) .......... hda15 (logical) hdc----IDE Ctrl 2-----hdd master slave
Partitioning
fdisk -l Display all hard disks and partitions recognized in the system. fdisk /dev/hda Partition hard disk hda. fdisk commands:
72
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS Command (m for help):m Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Creating a new partition: n --> primary-->..... Changing its partition system id: t--->l(list)-->83(linux) or 82(swap) List partitions: p Shows the partition table When all finished:(warning: last change to verify and correct if needed ) w Writes the partition table on disk!!! Note: Linux does not need the activation of the bootable flag, but Windows does. So if Windows is installed and the flag is on for its partition, then leave it there.
Creating a filesystem.
mkfs -t filesystem [options] device [blocks] or mke2fs [options] device [blocks] (for ext2 filesystem) Possible commands and their synonyms: mke2fs mkfs.ext3 mkdosfs mkfs.xfs mkfs.bfs, filesystems: ext2,ext3,vfat,msdos,reiserfs,xfs,minix,bfs,xiafs Options: -b Block size. Valid values: 1024, 2048, 4096 = mkfs.ext2 = mkfs -t ext2 = mkfs.ext2 -j = mkfs -t ext3 = mkfs.msdos = mkfs.vfat = mkfs -t vfat = mkfs -t xfs mkfs.minix,, mkfs.xiafs
73
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS -c Before creating the filesystem, check the device for bad blocks -i n Specify the number(n) of bytes per inode. Min = Block size. This helps to calculate the number of inodes to create. Number of i-nodes is dependent on the size of partition. -N n Specify the absolute number(n) of i-nodes to create. device: /dev/xxxx blocks: Optional. Size in blocks of the filesystem to create. If not given the size is auto detected. mkreiserfs options device or mkfs -t reiserfs " " " or mkfs.reiserfs " " " For making a reiser filesystem. tune2fs -j device Converts an ext2 to ext3 filesystem. xxxx=hda1.... hdc4 etc.
" "
74
Disk Usage
du du is recursive by default. du -sh /root Display amount of space used by /root directory du -h --max-depth=0 /home Amount of space used by /home (non recursive)
Disk Free
df List (in kilobytes) free & used space on mounted partitions df -h Same as above but in human readable format (K,M,G) df -i /dev/hda3 Show number of free inodes on hda3 Note: df -i doesn't show inode info for reiserfs or XFS, since they create inodes dynamically.
75
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS fsck.minix fsck.msdos fsck.vfat fsck.xfs For For For For minix Ms DOS FAT DOS VFAT XFS
Note: fsck should only be run on a non-mounted or read-only mounted filesystem. Syntax: fsck options filesystem options: (mostly for the ext2/ext3 filesystem) -A -f -p -n -y Checks all filesystems listed for check in /etc/fstab Force checking even if the Valid-Flag is not set(filesystem ok) Auto Repair without asking NO-Simulation. No writing of any changes on disk YES- Answer yes to any questions coming up. Dangerous!
76
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS Reset the number of mounts counter to 0. Extra examples: dumpe2fs /dev/hda7 | grep '[mM]ount count' dumpe2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09 Mount count: 7 Maximum mount count: 20 tune2fs -C 9 /dev/hda6 tune2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09 Setting current mount count to 9
77
78
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS The option user implies: noexec,nosuid and nodev unless overridden by subsequent contradictory options. Normal options for vfat Partition: user,umask=000 The option mount -w ... is the same as mount -o rw Almost all options can also be entered using mount -o. Example: mount -o ro,umask=000 -t vfat /dev/hdd /windows Display already mounted devices mount Most complete info cat /etc/mtab Not always refreshed immediately cat /proc/mounts Always current df -h Mounted devices and space used/free
79
Resmen
The user is allowed to cross the soft limit for the length of time limited by the grace period, after which he's not allowed to write anything on the partition. The hard limit may never be exceeded by the user. The quota limits may be expressed in number of 1k blocks or in number of inodes (total number of files and directories) or both.
80
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS repquota -g /dev/hda3 Turn quotas OFF(when needed) quotaoff -u /dev/hda3
81
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS +----------------------------------------------------------------------+ | Filesystem Block grace period Inode grace period | | /dev/hda7 7days 5days | +----------------------------------------------------------------------+ To copy the quota for other users with the same limit values, easiest way is: edquota -p john patrick This command will give patrick the same quota limits as john. To verify the status of the quota for the user john use the commands: su quota john The result: +------------------------------------------------------------------+ | Disk quotas for user john (uid 5001): | | Filesytem blocks quota limit grace files quota limit grace | | /dev/hda7 3288 4000 6000 649 2000 3000 | +------------------------------------------------------------------+ This means that the user john has 649 files using 3288 Kb of hard disk space. His soft limit is 4000 Kb or 2000 inodes and hard limit is 6000 kb or 3000 inodes
Repquota
Repquota produces summarized quota information for a file system. Here is a sample of the output that repquota gives: # repquota -a *** Report for user quotas on device /dev/hda7 Block grace time: 7days; Inode grace time: 5days Block limits File limits User used soft hard grace used soft hard root -- 175419 0 0 14679 0 0 john +6000 4000 6000 650 2000 3000 uucp -729 0 0 23 0 0 user1 -- 13046 15360 19200 806 1500 2250 repquota -g /home Report of groups quota repquota -u /home (same as repquota /home) Report of users quota
grace
82
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS quotaoff -u /dev/hda2 turns it OFF. Actually both files are similar. They are executed at system startup and shutdown.
setquota (8) edquota (8) quotaoff (8)/ [quotaon] quotacheck (8) repquota (8)
83
File type
These are displayed against the left margin in ls -l listings l d b c p s Regular files Symbolic Links (eg. /sbin/init.d/rc2.d......all files) Directories and sub-directories Block Device Files (eg. /dev/hda1...) Character Device Files (eg. /dev/tty1....) FIFO Named pipes (eg. /dev/log, /dev/xconsole) ???? (eg. /var/spool/postfix/private/bounce...)
File and directory names that start with a Dot (.) are hidden from display by certain programs like ls etc.
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS chmod -R u=rwX,g=rX,o=rX dir1 Recursively set 755 for directories and 644 for files.
SUID and SGID for programs (-rwsrwsrwx) (-rwSrwSrwx) SUID=ON: Effective user is the owner of the program SGID=ON: Effective group is the group owner of the program SGID for Directories Forces subdirectories and files created in it to have the same group as the directory's group independent of the creating user's group. Subdirectories created within this directory will inherit the same SGID. Sticky Bit for Directories Files in the directory can only be deleted by their owner even if the directory is set to write access for all. Sticky bit is normally set on /tmp to prevent another user's processes from deleting your files. Note 1: Normally any file (belonging to the user or not) under a directory set to write access for group or others can be erased by any user. Note2: The owner of the directory can erase any file in it even if the sticky bit is set. Sticky Bit for programs: Allows a running program to be stored in ram (buffers) until the system goes down. Advantage: Disadvantage: Programs load faster.. Uses lots of RAM
Note: Sticky bit for programs is obsolete. Linux has never used it and no modern Unix has used it for years swap memory does the same thing more effectively chmod o+t Sets the sticky bit result = (-rwxrwxrwt) or (-rwxrwxrwT) chmod u+t Sets the SUID result = (-rwsrwxrwt) or (-rwSrwxrwT) chmod u+t 85
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS Sets the SGID result = (-rwxrwsrwt) or (-rwxrwSrwT) Note: When adding a sticky-bit to a file/dir with an x for Others, the sticky-bit is displayed as t otherwise as T if the x was not present. The same applies to SUID and SGID (-rwSrwSrwT)
d i s S u
umask for new files and directories Sets default access rights for newly created files and directories: 86
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS New file access rights New directory access rights Examples: umask 22 135 216 New files (access rights 666) -rw-r--r--rw-r---w-r--rw---New Directories (access rights 777) -rwxr-xr-x -rw-r---w-r-xrw---x = 666 !| umask (!|=Logical NOR) = 777 !| umask
87
chown
Changes user and group ownership of a file or directory Syntax chown [options] [user][:group] filename chown [options] [user][:group] dirname Examples: chown user:group filename Change user and group ownership of file chown user filename Change user ownership of file chown user. filename Change user and his group ownership of file chown user: filename Change user and his group ownership of file chown .group filename Change group ownership of file Important Options:(from man page) -R recursive Recursively affects all files and directories inside directory trees --dereference Affect the referent of each symbolic link, rather than the symbolic link itself. -h, --no-dereference Affect symbolic links instead of any referenced file. (available only on systems that can change the ownership of a symlink) --from=CURRENT_OWNER:CURRENT_GROUP Change the owner and/or group of each file only if its current owner and/or group match those specified here. Either may be omitted, in which case a match is not required for the omitted attribute. -f, --silent, --quiet 88
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS Suppress most error messages -c, --changes Like verbose but report only when a change is made --reference=RFILE Use RFILE's owner and group rather than the specified OWNER:GROUP values. -v, --verbose Output a diagnostic for every file processed IMPORTANT: root is the only user allowed to change ownership(chown) of files or directories.
chgrp
Change group ownership of a file or directory Syntax: chgrp [options] newgroup filename Examples: chgrp -R ftp /srv/www Changes recursively all the files and directories inside the dir. /srv/www to be owned by group ftp chgrp -R --reference=/home/hans /srv/ftp Changes recursively the group ownership of all the files and directories contained in /srv/ftp to the group owning the directory /home/hans Options: -R, --recursive Operate on files and directories recursively --dereference Affect the referent of each symbolic link, rather than the symbolic link itself -h, --no-dereference Affect symbolic links instead of any referenced file (available only on systems that can change the ownership of a symlink) -f, --silent, --quiet Suppress most error messages --reference=RFILE Use RFILE's group rather than the specified GROUP value -v, --verbose Output a diagnostic for every file processed -c, --changes Like verbose but report only when a change is made
89
chmod
Change the access rights of a files or directories TODO
90
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS Hard links are limited to the same partition as the original file Symbolic links are NOT limited to the same partition as the original file cp source destination Copies the referenced file (the file that the sym link points to) when the source is a symbolic link. Example: cp linktest3 linktest5 (linktest3 is a symbolic link to linktest) Copies the content of linktest to linktest5 as a normal file. The second field of the command ls -l filename shows how many files are hard linked to that inode. ls -l linktest* -rw-r--r-- 3 michel -rw-r--r-- 3 michel -rw-r--r-- 3 michel video video video 0 2003-11-20 08:45 linktest 0 2003-11-20 08:45 linktest2 0 2003-11-20 08:45 linktest3
The command stat filename also shows how many files are hard linked to that inode. stat linktest File: `linktest' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 305h/773d Inode: 876319 Links: 2 Access: (0644/-rw-r--r--) Uid: ( 500/ michel) Gid:( 33/ video) Access: 2003-11-20 08:45:10.000000000 +0100 Modify: 2003-11-20 08:45:10.000000000 +0100 Change: 2003-11-20 08:45:22.000000000 +0100
92
1.104.8 Find system files and place files in the correct location
Descripcin: Candidates should be thoroughly familiar with the Filesystem Hierarchy Standard, including typical file locations and directory classifications. This objective includes the ability to find files and commands on a Linux system. Peso: 5 Archivos, trminos y utilidades clave: find locate slocate updatedb whereis which /etc/updatedb.conf
find
Recursively searches the filesystem to find files Syntax: find startdirectory [search_criteria_options] [-exec command \;] Examples: find . type d -maxdepth 1 Finds all directories located in the current directory cd /etc/ ; find . -name "*XF*" Recursively finds all files in directory /etc whose names include the pattern 'XF' find /opt/kde -maxdepth 2 -type f -name "*edit" Searches /opt/kde and subdirectories up to 2 levels deep for files whose names end with the word 'edit' find . -follow -cmin -5 Search the current directory for files whose properties were changed less than 5 minutes ago Timestamp syntax: -cmin +5 -amin -6 -mmin +8 -ctime +5 -atime -7 -mtime -3 Properties of file changed more than 5 minutes ago Content of file accessed less than 6 minutes ago Content of file modified more than 8 minutes ago Properties of file changed more than 5 days ago Content of file accessed less than 7 days ago Content of file modified less than 3 days ago
find /etc -type f -name '*.conf' -exec grep -H "hosts" {} \; Searches the /etc directory for files with the extension .conf. Executes grep on those files looking for the string hosts. When found, also displays the filename it was found in.
93
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS find /etc -type f -name '*.conf' -ok grep -H "hosts" {} \; Same actions as above except that -ok option asks find to prompt for confirmation (with y) of the command before executing it.
locate
Locate files in the whole system using a database of filenames. Syntax: locate filename Searches the locate database for the filename This database is in /var/lib/locatedb It is updated via the command: updatedb [options] The configuration file for updatedb is /etc/updatedb.conf Options: -d path, --database=path Instead of searching the default file name database, search the file name databases in path, which is a colon-separated list of database file names. You can also use the environment variable LOCATE_PATH to set the list of database files to search. The option overrides the environment variable if both are used. -e, --existing Only print out such names that currently exist (instead of such names that existed when the database was created). Note that this may slow down the program a lot, if there are many matches in the database. -i, --ignore-case Ignore case distinctions in both the pattern and the file names.
slocate
Secure version of locate Secure Locate provides the same features as locate but it will also store file permissions and ownership so that users will not see files they do not have access to. Syntax: slocate [options] filename The slocate database is not the same as the locate database. It needs to be built by issuing the slocate command with proper options: Database Build Options: -u Create slocate database starting at path / -U <dir> Create slocate database starting at path <dir> -e <dir1,dir2,...> 94
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS Exclude directories from slocate database -f <fstype1,...> Exclude files on specific file systems from the slocate database. -c Parse /etc/updatedb.conf when updating the slocate database. -l <level> Security level: 0 Turns security checks off. This will make searches faster. 1 Turns security checks on. This is the default. -o <file>, --output=<file> Specifies the database to create. -v, --verbose Verbose mode. Display files when creating database. Slocate Search Options: -i Does a case insensitive search. -q Quiet mode. Error messages are suppressed. -n <num> Limit the amount of results shown to <num>. -r <regexp>, --regexp=<regexp> Search the database using a basic POSIX regular expression. -d <path>, --database=<path> Specifies the path of databases to search.
whereis
Search for a program and possibly its man pages from a predefined path. Syntax: whereis filename Searches a predefined (hard coded) list of directories for the filename and man pages. They must be in the path predefined during compilation of whereis program.
which
Search for the first occurrence of a program in the PATH. Syntax: which filename
95
Tpico 104: Dispositivos, Sistemas de archivos Linux, FHS Searches the PATH for the first occurance of the filename. The filename can be a list of files. type -p filename Same as above which filename
96
Instalar & Configurar XFree86...............................................................5 Configurar un gestor de visualizacin.....................................................3 Install & Customize a Window Manager Environment............................5
Resmen
TODO
97
El Servidor X
El servidor-X brinda una pantalla vaca donde se mostraran los programas que soportan el protocolo-X y se controlaran mediante el ratn y el teclado. El servidor-X toma control de la tarjeta grafica, monitor, ratn y teclado locales; y posiblemente otros dispositivos como joystick, tablero grfico, etc. El servidor-X es un servicio de red para clientes locales o remotos (progamas-X). El servidor-X ha sido desarrollado para varias plataformas de hardware. La mayora de las aplicaciones del servidor-X son propietarias. El XFree86 es software libre, y es el que se explica a continuacin: La versin 3 de XFree86 contiene varios servidores X ejecutables para las diferentes resoluciones y profundidades de color. La versin 4 de XFree86 selecciona la resolucin correcta y la profundidad de color, as hay un solo ejecutable durante la ejecucin.
El archivo XF86Config
/etc/X11/XF86Config es el archivo principal de configuracin de XFree86. Ruta de bsqueda de XF86Config: Cuando se inicia X como un usuario normal: /etc/X11/$XF86CONFIG /usr/X11R6/etc/X11/$XF86CONFIG Entonces la ruta comn de bsqueda Cuando se inicia X como un usuario privilegiado (root). $XF86CONFIG /etc/X11/$XF86CONFIG /usr/X11R6/etc/X11/$XF86CONFIG $HOME/XF86Config Entonces la ruta comn de bsqueda Ruta comn de bsqueda:
98
Tpico 110: El sistema X Window /etc/X11/XF86Config-4 /etc/X11/XF86Config /etc/XF86Config /usr/X11R6/etc/X11/XF86Config.<hostname> /usr/X11R6/etc/X11/XF86Config-4 /usr/X11R6/etc/X11/XF86Config /usr/X11R6/lib/X11/XF86Config.<hostname> /usr/X11R6/lib/X11/XF86Config-4 /usr/X11R6/lib/X11/XF86Config Nota: En las 2 rutas anteriores /X-Rootdir normalmente es /usr/X11R6/ Dependiendo de la versin 3 y versin 4 la distribucin de los archivos de configuracin del Servidor-X se realiza en diferentes lugares. Las direcciones y nombres usualmente usados son: Version 3 Version 4 /etc/XF86Config /etc/X11/XF86Config /etc/X11/XF86Config /etc/X11/XF86Config-4
XF86Setup
xf86cfg
SAX
SAX2
Xconfigurator
dexconf
99
Tpico 110: El sistema X Window Todos los programas de configuracin anteriores hacen 2 cosas. Configuracin del archivo XF86Config. Crear un enlace simblico al Servidor-X configurado (Solamente Versin 3)
Ejecutando el Servidor-X
Cree un enlace simblico al Servidor-X configurado Versin 3 /usr/X11R6/bin/X ==> /var/X11R6/bin/X ==> /usr/X11R6/bin/XF86_Servertype Versin 4 /usr/X11R6/bin/X ==> /var/X11R6/bin/XFree86 Inicie el servidor X y el gestor de ventanas: startx (script) Afinar bien la configuracin del monitor: Manualmente con los botones del monitor Va el programa xvidtune
100
Tpico 110: El sistema X Window xset r rate 250 30 Cambia inmediatamente el retardo del teclado (250 ms) y la tasa de repeticin (30/s) Configuraciones controladas por el usuario: El Servidor-X puede tambin ser controlado para proporcionar ciertas configuraciones cuando se inician los programas del cliente-X usando el archivo ~/.Xresources. Nota: En SuSE ~/.Xresources es un enlace simblico a ~/.Xdefaults Secuencia para leer los archivos de recurso: Los archivos de configuracin global para cada programa-X separado, son los primeros en leerse del directorio /usr/lib/X11/app-defaults/* y entonces el archivo ~/.Xresources es leido. Los recursos de cualquier usuario y maquina especifica pueden ser especificados configurando la variable de entorno XENVIRONMENT con el nombre del archivo de recursos a ser cargado por todas las aplicaciones. Si esta variable no esta definida, el archivo llamado ~/.Xdefaultshostname es buscado en su lugar, donde hostname es el nombre del la maquina anfitriona donde se ejecuta la aplicacin.
xset
Cambia temporalmente la configuracin de la opcin FontPath del Servidor-X mientras se ejecuta: 101
Tpico 110: El sistema X Window xset +fp /usr/X11R6/lib/X11/fonts/TrueType xset fp+/usr/X11R6/lib/X11/fonts/TrueType Aade un FontPath xset -fp /usr/X11R6/lib/X11/fonts/TrueType xset fp-/usr/X11R6/lib/X11/fonts/TrueType Borra un FontPath
102
Tpico 110: El sistema X Window no-listen = tcp port = 7100 client-limit = 10 clone-self = on use-syslog = on deferglyphs = 16 catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled, /usr/X11R6/lib/X11/fonts/75dpi:unscaled, /usr/X11R6/lib/X11/fonts/100dpi:unscaled, /usr/X11R6/lib/X11/fonts/japanese:unscaled, /usr/X11R6/lib/X11/fonts/baekmuk:unscaled, /usr/X11R6/lib/X11/fonts/Type1, /usr/X11R6/lib/X11/fonts/URW, /usr/X11R6/lib/X11/fonts/Speedo, /usr/X11R6/lib/X11/fonts/CID, /usr/X11R6/lib/X11/fonts/PEX, /usr/X11R6/lib/X11/fonts/cyrillic, /usr/X11R6/lib/X11/fonts/latin2/misc, /usr/X11R6/lib/X11/fonts/latin2/75dpi, /usr/X11R6/lib/X11/fonts/latin2/100dpi, /usr/X11R6/lib/X11/fonts/latin2/Type1, /usr/X11R6/lib/X11/fonts/latin7/75dpi, /usr/X11R6/lib/X11/fonts/kwintv, /usr/X11R6/lib/X11/fonts/truetype, /usr/X11R6/lib/X11/fonts/uni, /usr/X11R6/lib/X11/fonts/ucs/misc, /usr/X11R6/lib/X11/fonts/ucs/75dpi, /usr/X11R6/lib/X11/fonts/ucs/100dpi, /usr/X11R6/lib/X11/fonts/hellas/misc, /usr/X11R6/lib/X11/fonts/hellas/75dpi, /usr/X11R6/lib/X11/fonts/hellas/100dpi, /usr/X11R6/lib/X11/fonts/hellas/Type1 # in decipoints default-point-size = 120 default-resolutions = 75,75,100,100 # font cache control, specified in KB cache-hi-mark = 2048 cache-low-mark = 1433 cache-balance = 70
Tpico 110: El sistema X Window Adems de los archivos de fuente (con extensiones .bdf, .snf y .pcf) ubicados en el directorio de fuentes, algunos archivos extra necesitan atencin: fonts.dir Contiene el nmero de fuentes disponible en este directorio (en la primera lnea) y una lnea por cada fuente con su descripcin. El formato es: Primera lnea: Nmero de fuentes listadas en el archivo (ej. 439) Resto del archivo: Archivo-de-fuente Descripcin-de-fuente Ejemplo: 439 putbi.pfa -adobe-Utopia-bold-i-normal0-0-0-0-p-0-adobe-standard putbi.pfa -adobe-Utopia-bold-i-normal0-0-0-0-p-0-iso10646-1 putbi.pfa -adobe-Utopia-bold-i-normal0-0-0-0-p-0-iso8859-1 ... Para crear este archivo se debe correr el programa mkfontdir Sintaxis: mkfontdir /ruta/al/directo/fuente Tipos de fuente vlidos: PCF (.pcf), SNF (.snf) y BDF (.bdf) fonts.alias Lista con entradas creadas manualmente asignando un nombre no existente de fuente a otra existente. Formato: alias nombre-fuente-existente Ejemplo: fixed iso8859-1 variable 5x7 5x8 x9 6x10 6x12 iso8859-1 6x13 iso8859-1 6x13bold iso8859-1 ... fonts.scale Lista de fuentes que son escalables. El formato es: Primera lnea: Nmero de fuentes listadas en el archivo (ej. 439) Resto del archivo: Archivo-de-fuente Descripcin-de-fuente Ejemplo -misc-fixed-medium-r-semicondensed13-120-75-75-c-60-*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-1 -misc-fixed-medium-r-normal--7-70-75-75-c-50-iso8859-1 -misc-fixed-medium-r-normal8-80-75-75-c-50-iso8859-1 -misc-fixed-medium-r-normal9-90-75-75-c-60-iso8859-1 -misc-fixed-medium-r-normal10-100-75-75-c-60-iso8859-1 -misc-fixed-medium-r-semicondensed12-110-75-75-c-60-misc-fixed-medium-r-semicondensed13-120-75-75-c-60-misc-fixed-bold-r-semicondensed13-120-75-75-c-60-
104
Tpico 110: El sistema X Window 439 putbi.pfa -adobe-Utopia-bold-i-normal0-0-0-0-p-0-adobe-standard putbi.pfa -adobe-Utopia-bold-i-normal0-0-0-0-p-0-iso10646-1 putbi.pfa -adobe-Utopia-bold-i-normal0-0-0-0-p-0-iso8859-1 ...
105
Gestores de visualizacin
Los gestores de visualizacin populares son: Nombre Directorio del archivo de config. xdm kdm gdm /etc/X11/xdm/ kde_rootdir/share/config/kdm/ gnome_rootdir/gdm/ kde_rootdir Directorio raz principal para el entorno de escritorio KDE. Para KDE3 es: /etc/opt/kde3 gnome_rootdir Descripcin Proporcionado por XFree86 Proporcionado por KDE Proporcionado por Gnome
106
Tpico 110: El sistema X Window Directorio raz principal para el entorno de escritorio Gnome. For Gnome 2 es: /etc/opt/gnome Propiedades de los gestores de visualizacin kdm est basado en xdm y usa muchos de sus archivos de configuracin. gdm es un nuevo desarrollo y de esta manera es independiente de xdm.
Configuracin xdm
xdm es un programa tradicional de X11 y ofrece slo un logo, fondo de pantalla y campos de ingreso (para cuenta de usuario y contrasea). Los parmetros para cambiar este comportamiento estn en: /etc/X11/xdm/Xresources Ejemplo: xlogin*greeting: xlogin*namePrompt: xlogin*fail: xlogin*login.greetFont: iso8859-1 xlogin*login.promptFont: iso8859-1 xlogin*login.Font: iso8859-1 xlogin*logoFilename xlogin*borderWidth xlogin*useShape: xlogin*greetColor: xlogin*failColor: xlogin*borderWidth: xlogin*frameWidth: xlogin*innerFramesWidth: xlogin*Foreground: xlogin*Background: xlogin*shdColor: xlogin*hiColor: Welcome at CLIENTHOST \040\040\040\040\040\040\040Login: Login incorrect *-FAMILY-bold-SLANT-normal--*-140-*-*-*-**-FAMILY-bold-r-normal--*-120-*-*-*-**-FAMILY-medium-r-normal--*-120-*-*-*-*/xxxxx.xpm true CadetBlue red 0 5 2 black #c0c0c0 #828282 #e0e0e0
xdm ejecuta cada vez un script llamado /etc/X11/xdm/Xsetup que presenta una ventana de ingreso. Ah podemos correr programas que cambian el fondo de pantalla, etc. Algunos ejemplos de tales programas son: xpmroot , xsetbg, etc /usr/sbin/xpmroot /etc/X11/xdm/background.xpm
Configuracin kdm
kdm trabaja de manera muy similar a xdm y usa muchos de sus archivos de configuracin: /etc/X11/xdm/ El archivo principal de configuracin de kdm es: kde_rootdir/share/config/kdm/kdmrc Los retratos de los usuarios mostrados en el ingreso de KDM son (formatos vlidos: .xpm 107
Configuracin gdm
gdm tiene sus propios archivos de configuracin separados de xdm/kdm. El archivo principal de configuracin es: gnome_rootdir/gdm/gdm.conf Mtodo de configurar gdm.conf: manual (editor) y (mucho mejor) a travz del programa de configuracin: gdmconfig Otras herramientas para configurar los retratos individuales de los usuarios mostrados en el ingreso por gdm: gdmphotosetup
108
Tpico 110: El sistema X Window *.linux.local myhost.linux.local #allow only myhost to remotely login El cliente usa una orden como X -query kdmserver :1 #Allow any host from my domain
110
Manejador de ventanas
El manejador de ventanas permite que las ventanas de la aplicacin puedan ser movidas, redimensionadas o iconizadas, Muchos muestran un barra para el ttulo de la ventana, algunos tambin muestran un men, o permiten arrastrar-y-soltar (drag & drop) entre aplicaciones. Manejadores de ventana comunes twm mwm olwm fvwm kwin windowmaker, etc Archivos de configuracin de algunos manejadores de ventanas: Son diferentes para cada uno pero sew ve que muchos tiene un archivo de la forma .xxxxrc. Estos estn normalmente en el directorio base del usuario ($HOME). Ejemplos: .mwmrc .fvwm2rc .olwmrc etc.
-geometry
Esta opcin posiciona y dimensiona la vetana cuando un cliente X se inicia Sitxis: 111
Tpico 110: El sistema X Window -geometry <Hsize>x<Vsize><Hpos><Vpos> <Hsize> y <Vsize> son nmeros en caracteres <Hpos> '+' es derecha, '-' es izquierda (en pixeles). Ej. +10 es 10 pixels a la derecha <Vpos> '+' es abajo, '-' es arriba (en pixeles). Ej. +10 es 10 pixels desde abajo Ejemplos: -geometry 1x1+0+0 1 caracter horizontal, 1 caracter vertical, esquina superior izquierda -geometry 5x20-10+30 5 caracteres de ancho (horizontal), 20 caracteres de alto (vertical), Posicionado en la esquina superior derecha 10 pixeles horizontalmente a la izquierda 30 pixeles verticalmente abajo (inferior) Nota: La geometra tambin puede ser fijada individualmenete para clientes X editando el archivo ~/.Xresources. Eejmplo: Xterm*geometry: 90x30
112
Tpico 110: El sistema X Window xterm*background: xterm*Foreground: xterm.eightBitInput: xterm*multiScroll: xterm*jumpScroll: xterm*font: 90-xterm*ScrollBar: xterm*SaveLines: xterm*VisualBell: xterm.eightBitOutput: Xterm*geometry: xrdb -merge .Xresources LightYellow2 Blue true on on -adobe-courier-bold-r-normal14-140-75-75-mon 2000 true true 90x30
113
X11 en la red
Preparando el cliente X
Puesto que casi todos los Clientes X pueden usar el argumento -display :xx, podemos iniciar un programa cliente y enviar su salida a cualquier servidor X existente que vaya a permitir la conexin. Todos los programas cliente X necesitan saber donde est localizado el servidor X con el que intentarn hospedar el programa. Esta informacin es dada al programa cuando lo iniciamos ya sea por medio del argumento anterior (-display :x.x) o por medio de la variable de entorno DISPLAY. Para hacer eso, la siguiente orden prepara el contenido de esta variable: export DISPLAY=X-ServerHost:xx entonces corra el programa cliente X.
Preparando el servidor X
De modo predeterminado los Servidores-X slo permiten que programas del usuario local sean mostrados. Para que otros usuarios o hosts tengan permitido mostrar sus programas Cliente-X en l, el Servidor-X necesita que se le notifique hacerlo. La notificacin es hecha con la rden xhost. Sintaxis: xhost [+|-] ClientHostName Ejemplos: xhost + localhost Permite que otros usuarios Clientes-X en el host local usen este ServidorX. xhost + Permite a todos desde cualquier hosts usar este Servidor-X. Peligroso ! xhost + myfriend Permite que los programa Cliente-X en el host myfriend usen este Servidor-X. xhost bugger Impide que el host bugger use este Servidor-X. Nota 1: Slo el dueo del proceso Servidor-X est permitido de usar la orden xhost.
115
Glosario de trminos
Glosario de trminos
This list contains the complete list of terms assumed by LPI tests. Knowledge of these terms will be important in preparing for LPI exams, but no exam question should depend on knowledge gleaned solely from this list. Note that the list will be updated occasionally (so it is not yet exhaustive). If you have any additions or comments, please let us know. The purpose of this list is to delineate the terms (jargon and acronyms) that will be used in the LPI Linux certification exams. Before writing or reviewing items, please review this list (and check it out periodically afterwards as updates occur). Any jargon term or acronym which does not appear on this list, or is in the "deprecated alternatives" column, should NOT be used in an LPI test. If this is not perfectly clear or if you need help deciding whether something is jargon or an acronym, please contact an appropriate LPI coordinator, the list maintainer or us. Other useful and authoritative glossaries of terms can be found in these RFC's: RFC1208: A Glossary of Networking Terms RFC1983: Internet User's Glossary RFC2828: Internet Security Glossary (also see http://freesoft.org/CIE/RFC/Orig/rfc2828.txt) For explanation of PC hardware components, see: http://www.pcguide.com/ref/ Term *NIX Deprecated Alternatives Comment A term for any operating system resembling UNIX(R)(TM), including Linux and a large number of free and commercial systems; also UN*X. So-called Thin Ethernet, using RG-58 coax cables and BNC connectors to construct a chain of cables, which must be terminated by resistors; supports a maximum (theoretical) transmission of 10 Mbit/s. The older Thick Ethernet, which used vampire taps into a single cable; supports a maximum (theoretical) transmission of 10 Mbit/s. Ethernet over UTP cables, using hubs to produce a star topology; supports a maximum (theoretical) transmission of 10 Mbit/s. Ethernet over UTP cables, using hubs to produce a star topology; supports a maximum (theoretical) transmission of 100 Mbit/s. To connect to and utilize a device (computer, printer) or file. The symbol or number that refers to a user for accounting purposes.
10Base2
10Base5
10BaseT
100BaseT
access account
116
Glosario de trminos Term address [1] Deprecated Alternatives Comment A location in memory; specifically, the I/O-port used by a device to communicate with the processor. A unique identifier assigned to an interface on a network-attached device such as a network interface card. Notice: a host can have multiple interfaces, hence multiple addresses. The name|number|both given to a computer, device or resource so it can be identified, found and accessed on a network. (to make it work. ;-) To control the operation and use of a computer or other device; the task of a system administrator. A formal Descripcin of a procedure that, when suitable input is entered, will generate output as a result that satisfies specific requirements. Within a shell, a substitute word for a command string (e.g.: alias dir = "ls --color"). An additional IP address on an interface. Refers to another name given to an e-mail account, in order to accept mail for one e-mail address and forward it to another. the Alternative key on a keyboard Refers to a physical measure that can take any value within a continuous range; e.g., the voltage used to encode loudness when transmitting a signal over a conventional copper telephone line. cf. digital. A standards body responsible for many protocols. A specification which allows simple access to functionality of a library or other system resources when writing a program; operating system functionality is made available through an API. A program that runs on top of an operating system. The name of the top layer of both the sevenlayer ISO/OSI model, and the four-layer TCP/IP protocol stack; although some of the functionality of the session and presentation layers of the former may be assigned to the latter. It includes protocols such as telnet, FTP HTTP SMTP etc. , , , A backup of data to be preserved.
address [2]
address [3]
administer
algorithm
ALT analog
ANSI API
archive [1]
117
Glosario de trminos Term archive [2] Deprecated Alternatives tarball Comment A file that contains one or more components and an index (e.g. in tar, cpio, rpm or deb format). A piece of information passed to a command or function (usually typed in behind it), that modifies its behaviour, or that is operated upon by the command or function. e.g. in `cat motd`, "motd" is the argument. cf. parameter. See RFC826. A low-level protocol which, given an IP address on the local network, returns the Ethernet MAC address of the corresponding interface. cf. RARP . A specification of characters widely used in the UNIX world and beyond. The ratio between the width and the height of a pixel on a computer display. A program that compiles programs written in assembly language into object code. A low-level computer language that can be translated directly to the object code of the computer processor. A popular 16-bit interface standard that extends the ISA bus of the IBM PC-AT to attach peripherals; it has evolved through over 5 generations; the original ATA is better known as IDE. An enhancement of the ATA protocol to be able to connect CD drives etc. This list was compiled by (in alpha order): Les Bell, David DeLano, Alan Mead, Tom Peters, Richard Rager. A state of process execution which does not produce output to the terminal (execution may stop if the process tries to write to the terminal); it is common to run system processes and long running user applications in the background; cf. foreground [1]. A copy of essential data stored on- or off-site as insurance against failures of system hardware, software or user. To make a backup. taking two discrete values (e.g. bits), as opposed to decimal (= taking ten discrete values).
argument
ARP
ASCII
AT Attachment
ATAPI Authors
background [1]
118
Glosario de trminos Term binary [2] (noun) Deprecated Alternatives Comment A file that is not intended to be read by humans but by applications or the operating system; especially in plural ("binaries") for compiled sources; cf. text. A simple, low-level operating system which supplies a uniform API to higher-level operating systems; BIOS is generally implemented in ROM of some sort. The smallest entity of information: can have one of two states (0-1, on-off, open-closed, etc.). The number of bits available for each display pixel to code for visual appearance (color, proximity, etc.). A device that exchanges data with the operating system in sizable blocks (e.g., 512 bytes) at a time. Software, usually installed on the MBR of Intel machines, which exists to load the operating system kernel and begin its functioning. To cause the operating system to begin to function. Takes its name from "pulling oneself up by the bootstraps", a whimsical analogy applied to the BIOS loading itself and then running the "boot loader". (Also reboot). See RFC951; cf. DHCP . A device that propagates packets between two computer networks; it operates at the second, data link layer within the ISO/OSI model, and broadcasts packets based on the address, but does not do routing. cf. repeater, router. A frame or datagram addressed to all interfaces on a network. A variant of UNIX originally developed at the University of California, Berkeley. The BSD TCP/IP stack is the model for most subsequent TCP/IP implementations. temporary storage; cf. cache A mailing list for discussions regarding network security (daemons, programs, operating systems, routers). To run a sequence of compile and link steps to produce a new version of an executable program. A cable for transmitting signals between various components within one computer system.
BIOS
bit
bitplanes
block device
boot loader
boot
BOOTP bridge
buffer BUGTRAQ
build
bus
119
Glosario de trminos Term byte C C++ cache Deprecated Alternatives Comment A data type of 8 bits. A compiled computer language closely associated with UNIX. An object-oriented computer language derived from C, that needs a compiler. Any readily accessible storage area used to keep data handy which is (somehow) indicated to be needed again shortly; the purpose being to speed up the access of that data and improve system performance. Specifically: the fast computer memory that is used as a buffer for data and program instructions between the CPU and the slower main memory (cf. RAM). A domain name server that does not have any domains files. A commercial Linux distribution.
CERT
cf.
Any device that can be plugged into a computer expansion slot. Compact Disc Read Only A removable medium of considerable Memory popularity which comes in several variations, the most popular being ISO9660. Computer Emergency A team of people that study Internet security, Response Team and provide incident response services; see http://www.cert.org/ "confer", which means "consult" in the meaning of "also see" or "compare". N.B.: Avoid this. Use only in parenthetical examples (cf. e.g., i.e.) but avoid "cf." by putting examples in text like this. Also see "e.g.", "i.e.". Common Gateway A standard for allowing server applications to Interface be executed as part of a HTTP request. Challenge Handshake Authentication Protocol character C data type (usually one byte) used to store letters (cf. character). char A letter or sign usually represented by 1 byte in ASCII code. A device which exchanges data with the operating system in one character (or byte or even word) at a time. Any process created by another, so-called parent process; usually used in reference to a particular parent process.
120
Glosario de trminos Term CIDR CIFS Deprecated Alternatives Classless Inter-Domain Routing Common Internet File System Comment See RFC1519; cf. variable length subnet mask Microsoft's successor to SMB, a suite of protocols for sharing file and print services (among Windows machines or UN*X machines running CIFS servers like Samba). In reference to a drive being mounted, clean means that the drive was unmounted properly and thus (theoretically) does not need to be checked; otherwise a drive is dirty A computer or process which connects to and receives a service from a server computer or process. Cable with inner and outer conductors used for TV cables and for Ethernet LANs, where the computers usually have T-joints to attach to a single chain of cables which needs to be terminated by resistors. A table used to encode a palette of colors for images. An interactive user interface which allows commands to be given to a computer program or shell through a text-based terminal (or terminal emulator in a window within a graphical user interface). A program which examines program source code and translates it into an equivalent object code file; cf. interpreter. Removal of redundant information from a file or data stream, to reduce its size, the storage space it needs, or the time needed for transmission. Lossy compression actually discards information that is considered not essential, and is only appropriate for data like images or sound. A digital, electronic, general-purpose, programmable, information processing automate. The primary, directly attached, user interface of a computer. Some system administration functions may only be performed at a console. A collection of buttons, switches, lights or display used to configure and control a router, printer, computer or other device. The content of memory written to a file on disk (usually called "core") when a program crashes. damaged (said of a file or disk contents)
clean
client
coax
co-axial cable
colormap
compiler
compression
computer
console
control panel
core dump
coredump
corrupted
121
Glosario de trminos Term CPU Deprecated Alternatives Central Processing Unit Comment The main component that makes a computer work; these days usually a "micro-processor" on a single silicon chip (cf. processor). To gain access to a computer system without proper authorization (e.g. by guessing a legitimate user's password), and possibly interfere with its normal operation or integrity. Someone who tries to crack; cf. hacker. A software program used to crack, for instance by guessing passwords. A sudden stop of normal operation. Supposedly, the original hard drives would sometimes experience a catastrophic failure in which the read/write heads would crash into the media, possibly sending the media flying; hence a crash is a unintentional termination of software or hardware due to some failure or error - especially a termination in a final, catastrophic, or unpleasant way. SLIP with added VJ compression of IP headers. See RFC1144. the Control key on a keyboard
crack
crack
daemon data
A number of tracks located at the same radius on the several surfaces of a hard disk. A hard disk with four platters has eight surfaces, so that at each position of the read-write heads, eight tracks can be read without head movement and these eight tracks form a cylinder. A program that runs in the background to offer system services. "that which is given", for instance as input to a computer; cf. information.
122
Glosario de trminos Term data link layer Deprecated Alternatives Comment Layer two of the ISO/OSI seven-layer model. Responsible for establishing an error-free communication path between network nodes over the physical link layer, it frames messages for transmission, checks the integrity of received messages, manages access to and use of the media, and ensures proper sequencing of transmitted data. These functions are generally provided by a network card driver. The IEEE in its 802.x series of standards splits this layer in two: the LLC layer and the underlying MAC layer. A usually large collection of ordered and readily accessible data. A program to manage a database and extract information from it. packet, especially as used in UDP (Note: not IP-specific - other protocols use the term datagram in their documentation). A GNU/Linux distribution built by a volunteer organization. The value of a parameter that a program uses if it is not explicitly given a value. the Delete key on a keyboard remove or erase a file|character|directory . A state in which other libraries|programs| packages are required to make a program work. A USA government-sanctioned standard for the encryption of data now considered insecure to high-end brute force attacks. The screen from which all programs are started and run on X. A "peripheral" piece of hardware that is an optional part or can be attached to a computer (even one that is actually housed within the computer's casing): interface cards, drives, printers etc. The software interface used within Unix (Linux) to represent a computer peripheral: interface cards, drives, printers, etc.; see the /dev/ directory .
DES
device [2]
123
Glosario de trminos Term DHCP Deprecated Alternatives Dynamic Host Configuration Protocol Comment Provides for automatic downloading of IP address and other configuration data from a server to a client. Allows for reuse of IP addresses so that the number of hosts can exceed the number of available IP addresses. See RFC2131, cf. BOOTP .
dial-in, dial-up, Refers to a connection dial-out (adj) made over the Public Switched Telephone Network (PSTN), as opposed to a permanent, or leased-line, connection. die To cease execution, especially in a final or complete manner. digital Refers to an entity that can assume only a limited number of discrete states and not an arbitrary value; e.g. binary. cf. analog. directory A special type of file which contains information about other files, such as file name, location, permissions, size etc. dirty not clean disk Rotating magnetic media which supports direct or random access; cf. floppy disk, hard disk. display screen A human readable device to display text, graphics or other data. distribution A (usually) complete collection of software needed to operate a computer including the Linux kernel and various utilities and applications. DMA Direct Memory Access A hardware protocol which allows a special controller circuit (DMA controller) to transfer a block of data from a peripheral device's buffer memory directly to main memory without CPU involvement; cf. PIO. DNS Domain Name System A hierarchically-structured distributed directory service which translates humanintelligible names like www.lpi.org into the corresponding IP addresses. See RFC's 1034 and 1035 and also 1032 and 1033. documentation domain name DNS, nameserver server domain [1] One or more computer networks that serve an organizational group. domain [2] The name assigned to a network domain.
124
Glosario de trminos Term drive Deprecated Alternatives Comment Any device that can store and retrieve data in a relatively permanent fashion on media (which may be removable or built into the device).
"for example" (Latin: "exemplum gratii"). N.B.: Avoid this. Use only in parenthetical examples (e.g., like this) but avoid "e.g." by putting examples in text like this. Do not confuse with "i.e.". Also see "cf.". Enhanced IDE Western Digitals proprietary extension of the IDE interface standard with ATA-2 and ATAPI features, used to connect hard drives and CDROMS to a PC. To simulate the actions of a device or program so that the simulation can actually perform the same functions as the original. A program that emulates the functions of some device or other program. A collection of variables associated with a process so that it knows about the user preferences and configuration of the system; they are inherited by a child process. The variables that define an environment. easy to use by humans the Escape key on a keyboard A type of LAN computer network interface using coax (10Base2 or 10Base5) or UTP cables (10BaseT or 100BaseT). The specifications are described in IEEE standard 802.2 . cf. MAC. To set to work (a program); cf. run. Permission set on a file on a Unix filesystem so that it may be run as a program by the "operating system. A file that is a binary or a script that can be run as a program (may assume execute permission).
editor EIDE
e-mail emulate
emulator environment
export
125
Glosario de trminos Term FAT Deprecated Alternatives File Allocation Table Comment A simple filesystem using a table to index files on a block device (floppy or hard disk). It comes in the varieties of FAT-12 (MS-DOS), FAT-16 (MS-DOS, MS-Windows 3.x) and "FAT32" (MS-Windows 9x). A proposed standard for the location of files on a Unix system. See http://www.pathname.com/fhs/. A named sequence or stream of bytes at a known location in storage. The data structures placed on a logical disk or partition (by mkfs) which allow the operating system to record information about files stored there. To remove unwanted data. A gateway that restricts data communication between the "inside" network and the Internet "outside" the firewall. used with numbers that may represent a fraction; cf. integer A magnetic storage medium with a flexible disk inside; cf. hard disk. A device that can read and write floppy disks. The shape of each of the letters in a character set. The context in which a process is having access to a terminal for output, i.e. is not running in the background. The color of text on a computer display (as opposed to the text's background). Refers to the window 'in front of' all others and with which the user is interacting. When an executing process creates an exact executing duplicate (except for the different PID) of itself; see child process, spawn. Specification regarding how data are stored. To apply the requisite format to storage media in preparation to making a filesystem. The act of receiving an e-mail and then resending it to another destination. A packet as assembled and transmitted over the physical layer of a network (e.g. Ethernet, Token Ring, etc.). Not costing anything.
FHS
filter firewall
free [1]
126
Glosario de trminos Term free [2] Deprecated Alternatives Comment Not inhibited. As applied to source code it allows modification, study and adaptation, not inhibited by excessively restrictive commercial license terms. cf. GPL, Free Software Foundation. Free Software Foundation: a tax-exempt charity that raises funds for work on the GNU project; see http://www.fsf.org. A standard for the location of files on a Linux system; replaced by the FHS. A protocol for transferring files over the Internet and the software to accomplish the transfer. See RFC959. A device or relay mechanism that connects two or more computer networks and which directs packets between the networks in an internet. In common usage today, a gateway is a general-purpose computer with a generalpurpose operating system [e.g. Linux] which *may* be performing other functions, and in that role it operates at the third, network layer in the ISO/OSI model; while a router is a special-purpose computer with a special purpose operating system [e.g. IOS], generally from a specialist supplier [e.g. Cisco]). cf. bridge. 1000 (or rarely 1024) MB (1,000,000,000 or 1,048,576,000 or 1,073,741,824 bytes) Group ID A variable, configuration section, procedure etc. having a scope which is unlimited (i.e., applies everywhere unless contradicted locally) A Free Software Foundation project to build Unix(R)(TM)-compatible utilities and programs exclusively based on free program source code. A license for distribution of free software which permits copying, modification and redistribution. It was created by the Free Software Foundation for its projects like GNU, and has been applied to Linux as well. See http://www.gnu.org/copyleft/gpl.html images, pictures; in contrast to text
FSF
FSSTND FTP
gateway
GB GID global
GNU
GPL
graphics
127
Glosario de trminos Term Deprecated Alternatives graphical user GUI interface Comment An interactive interface using a graphics display. N.B.: refer to a "graphical user interface" only if there actually is a graphical interface (like X), and do not use it for interactive programs on text terminals (based on ncurses or slang). Use "interactive interface" as a catch-all. cf. command line interface. Refers to a list of one or more users having the same access rights; see /etc/groups . To accomplish a result in an unorthodox way. Someone who hacks: a title assigned to people with remarkable computing skills; cf. cracker. cf. crash A computer device that uses solid disks as magnetic medium to store data. cf. floppy disk. In Unix filesystems, an entry in a directory that points to a file in another directory on the same disk or partition, and shares the inode of that file; cf. symbolic link. All physical parts making up the computer ("the parts that can be kicked" ;-) ISO/IEC 3309 standard; relevant in PPP . Refers to a computer language with a higher level of abstraction from the computer architecture than a low-level language. Any computer attached to an IP-based internet, especially computers that can act as a server to a client program or computer. A series of documents, each on a particular topic, which form a significant portion of the documentation for Linux. HOWTO's originated with, and are generally published by, the Linux Documentation Project. A standard for specifying the structure of a document indicated by tags in the document text; used on the World Wide Web with HTTP . The succession of application layer protocols used for communication between a WWW browser and a WWW server. See RFC2616. Generally, a device connected to several other devices; specifically in computer networks, a repeater in the center of a network with star topology, usually with 10BaseT or 100BaseT Ethernet.
hard link
host
HOWTO
HTML
HTTP
hub
128
Glosario de trminos Term i.e. Deprecated Alternatives Comment "that is" (Latin: "id est"). N.B.: Avoid this. Use it only in parenthetical asides (i.e., asides like this one) and then only to clarify a point. Do not confuse with "e.g.". Also see "cf.". Input/Output Internet Control Message Protocol A required protocol (RFC792) for the notification of errors between gateways and hosts on IP-based internets. It operates at the level of the IP protocol in the internet layer. Interestingly, although ICMP is required (*must* be implemented), hosts and gateways are not required to generate ICMP messages, and hosts are not required to respond or react to incoming ICMP messages (in fact, mostly, they don't, relying on higher-level protocols like TCP to simply time-out and retransmit, so you can't say that ICMP _handles_ errors). Also, because IP is a packet-oriented connectionless protocol, there's no concept of duration of transmissions. IDentifier A popular interface to attach hard drives to PC's, where the electronics of the controller are integrated with the drive instead of on a separate PC card; also see ATA. A programming environment integrated into an application; rare on Linux.
I/O ICMP
ID IDE
IDE
inactive; waiting for a task or a wake up call Institute of Electrical and USA based, international organization of Electronics Engineers professional engineers; also an important standards body Interactive Mail Access See RFC1203 Protocol Internet Message Access See RFC2060 on IMAP4 (beats me why Protocol there's two names for the same thing, with the same acronym yet). To create an actual object (program, device) that conforms to abstract specifications. A file which contains constants and parameters, possibly shared between two or more programs, and included into the source code when these programs are compiled. info Something worth knowing, in contrast to just plain data. In Unix filesystems, a block of administrative data for a file on the disk partition. Any data that are entered into a running program, or into a file. 129
Glosario de trminos Term install Deprecated Alternatives Comment Transferring a new program to a computer's permanent storage (e.g., hard disk) and performing any necessary configuration or administration. A data type used to represent a whole (integer, non-fraction) number within a limited range. correctness Adjective, meaning: having the property to be able to interact, i.e. respond to stimulation from the outside. Used in the context of programs or interfaces. An interface between a computer and a user which allows them to interact and exchange input and output (commands and data). A connection (through a hardware device or through a software program) between different components of a computer system (usually performing some kind of translation between protocols internal to the components); used especially in the contexts of network communication, or communication between computer systems and their users. The worldwide distributed network of computers linked by the Internet Protocol. The network layer in the TCP/IP protocol stack: this alternative name may be used to distinguish it from the underlying network access (physical) layer. cf. Internet Protocol. A company which provides connections to the Internet. A program which examines a script or program source code and executes it, line by line; cf. compiler. A network (usually a LAN) based on IP but, unlike the Internet, allows only restricted access. induce execution of; call The memory address peripheral devices use to communicate with the CPU; see /proc/ioports . The network layer protocol used on IP-based internets. See RFC791. An increasingly obsolete PC bus standard.
integer
integrity interactive
interrupt intranet
invoke ioport
address
IP IRQ ISA
130
Glosario de trminos Term ISDN Deprecated Alternatives Integrated Services Digital Network Comment
kernel
keyboard LAN
link
A baseband protocol used by telephone companies to offer one, two or more Bchannel (Bearer channel) lines of 64 Kbit/s each on a single copper pair of up to 5.5 km length. Each B-channel can be used to provide a high-quality voice line, or fax or data services. International Standards One of several bodies which exist to promote Organization standards, including computer standards. A task which has been sent to the background or has been submitted for later execution. K, kilo a factor of 1000, but with computers usually 1024 (2^10) kilo-byte, kilobyte, kb, kB 1024 bytes kilobit per second, kbps, Data transfer rate in units of 1000 bits per Kbps, Kbit/s second. kilobyte per second, Data transfer rate in units of 1024 bytes per kbps, Kbps, KBps, KB/s, second. kbyte/s The core of an operating system, which provides multitasking (process creation, interprocess protection, interprocess communication), memory management, and basic I/O management. A token which is used to encrypt plain text or decrypt cipher text in an encryption system. A database field which may be used as the basis of a query. A marked switch on a keyboard which used to be a common computer input device before they were eaten by mice ;-). An input device having many keys marked with letters and other symbols. Local Area Network A small network, usually with one or a few segments, which supports broadcasting and direct connections between hosts; e.g. Ethernet, Token Ring, Appletalk and ARCNet; cf. WAN. Linux Documentation Project A collection of (often related) subroutines to be linked to a program. LInux LOader A boot loader: a program that loads the kernel so Linux can boot; can also boot other operating systems. To bind a program to the subroutines it references (calls). These are typically located in object modules or libraries. 131
Glosario de trminos Term Linux Deprecated Alternatives Linux Is Not UniX? Comment A Unix-like operating system first developed, still maintained by, and named after Linus Torvalds. It is freely available under the General Public License. But if you didn't know all that already, what are you doing here? An IEEE network standard (#802.2) that fits within the ISO/OSI Layer 2: data link layer, on top of the MAC sub-layer. It deals with error detection, flow control, and frame formats. To transfer from disk into memory. within easy reach, on the local area network, not remote. record of activities In the jargon of electronics engineers: the electronic components and circuitry of a device. This use of the term should be avoided because of the confusion with the conventional meaning of: abstract formal reasoning, which is involved in computer programming.
LLC
LPI
MAC
Refers to a computer language in which statements are similar to instructions for the processor (or: in which statements are more like object code than in a high-level language). Non-profit organization founded to create a widely supported certification program for Linux; see http://www.lpi.org/ A layer of IEEE network standards (#802.x) that fits within the ISO/OSI Layer 2: data link layer, below the LLC sub-layer. It deals with access methods, error detection, and transmission unit formats. Well-known IEEE MAC specifications are Ethernet in its various incarnations (#802.2) and Token Ring (#802.5?). An end-user program used to access, process, read, archive, compose and send e-mail messages. See RFC1711. Such e-mail programs often include some "MTA" functionality, in particular the ability to use SMTP to send e-mail to an outgoing mail server, and POP3 or IMAP4 protocol to download mail from an inbound mail server. cf. Message Transfer Agent. 132
Glosario de trminos Term maintain manual [1] (noun) manual [2] (adj) man page Deprecated Alternatives Comment
manual page
masquerade
MB Mbit/s MBR
mega-byte, megabyte, meg, Mb Megabit per second, Mbps Master Boot Record
media memory
A document, often of book-length, discussing the design or operation of a software package or device. by hand (as opposed to some more automated means) Standard Unix manual page (usually available on the computer system in nroff format, called with the command `man`). To pretend to be another host for the purposes of sharing one IP address among several local hosts hidden to the outside world for reasons of resource shortages or security. cf. NAT 1000 (or sometimes 1024) KB (1,000,000 or 1,024,000 or 1,048,576 bytes). Data transfer rate in units of 1,000,000 bits per second. An area of the outermost cylinder of a PC hard disk which contains the partition table. This contains four entries identifying the types, starting cylinder and sizes of up to four partitions on the hard disk. One of the entries is flagged as 'active'; this marks the partition from which the machine will boot. (Floppy disks don't have an MBR, since they don't have a partition table. Instead, they just have a boot sector (same as a logical disk), which contains a Media Descriptor Table (MDT) and bootstrap loader. The MDT describes the format of a floppy disk or logical disk). The physical device by which data are transmitted or (more commonly) stored. The place where a computer stores data and| or programs for direct access by the CPU: RAM or ROM (and also cache memory), not disks.
menu
133
Glosario de trminos Term Deprecated Alternatives Message mail transfer agent, mail Transfer Agent transport agent, message transport agent, MTA, MDA, mail delivery agent, message delivery agent Comment (by L.B.?) A program which routes e-mail based on the RFC822 header and invokes the correct delivery agent, especially SMTP (RFC821) in order to route the mail towards its ultimate destination. For example: exim, qmail, sendmail, smail. Also see RFC1711 and Mail User Agent. The term "Mail Transport Agent" is used in the online "Network Administrator's Guide" to refer to rmail, which, of course, is used to process incoming mail from UUCP before passing it onto sendmail. This usage is at least confusing, if not incorrect. On MDA (Message Delivery Agent): This one really has me going. I'm not sure whether it is: "A protocol, or its implementing program, responsible for transferring messages from one host to another. For example, SMTP ."; or: "A program responsible for delivering mail to the correct user mailbox on a host. For example, sendmail." I've been researching this in my paper library and on the net for the last half hour, and have not come up with any consistent or reasonably definitive examples. Personally, but based on what evidence I can't remember, I lean to the first definition, but Aileen Frisch uses the second in her "Essential System Administration" book. Hold on - after a search at http://www.imc.org , I've discovered RFC 1711, which defines MTA and UA, but has no mention of (M)DA. I think this one is what we in Australia would call "a furphy". - Hence the use of "MDA" is to be AVOIDED. A slimmer, more focused document otherwise like a HOWTO. MOdulator/DEModulator A device that converts between digital signals from the computer and analog signals for communication over a telephone line. An input device which allows pointing to, selecting and activating objects, usually displayed in a graphical user interface. A 32-bit operating system from Microsoft(C)(R)(TM).
mini-HOWTO modem
monitor mouse
MS-Windows NT
NT, Windows NT
134
Glosario de trminos Term MTU Deprecated Alternatives Maximum Transfer Unit Comment
Maximum size of an IP packet that will be accepted for transmission without fragmenting it into smaller datagrams. Usually an optimal size is determined automatically; typical sizes are 296 bytes (40 header + 256 data for phone lines), and 1500 bytes (the maximum for ethernet connections). NAT Network Address A generic Descripcin of the process whereby Translation the IP address of a host on a private internet is translated into an IANA-assigned unique address on the wider Public Internet. This can be accomplished by several techniques: masquerading, circuit-level gateways such as SOCKS, transparent proxying or applicationlevel gateways. N.B. "take good notice" (Latin: "nota bene"). NetBEUI NetBIOS Extended User The current implementation of the NetBIOS Interface protocol used in MS-DOS, MS-Windows and OS/2. NetBIOS over A layer of code which implements the TCP/IP NetBIOS API, but utilizing TCP and UDP datagrams, which are of course encapsulated in IP datagrams. Since IP is routable, this overcomes the most significant limitation of NetBIOS. See RFC's 1001, 1002, 1088. NetBIOS Network BIOS A lightweight transport protocol developed by Sytek, IBM and Microsoft for use on personal computers. NetBIOS defines three things: the protocol on the wire (datagram formats); the code which implements the protocol; the API used to employ the protocol. The major example of an application which uses the NetBIOS API is Microsoft Networks, the workstation and server code implemented in MS-DOS 3.0 and later, OS/2 and various Windows incarnations - though other applications do exist. NetBIOS employs name registration and broadcast discovery, rather than addressing, and is consequently a nonroutable protocol. cf. SMB, NetBIOS over TCP/IP . netmask network mask: the network part of an IP address; cf. variable length subnet mask network An interconnected set of hosts and other network devices which share a common physical layer such as Ethernet, X.25, etc.; cf. LAN, WAN.
135
The lowest layer of the TCP/IP protocol stack, also known as the "physical" or "hardware" layer. Consists of the cables, connectors and associated hardware such as driver chips to implement a network such as Ethernet or Token Ring, as well as the drivers for the hardware. It approximately spans the lowest two layers of the theoretical ISO/OSI network protocol stack: the physical and data link layers. network NIC, Ethernet card, LAN An expansion board allowing a computer to interface card adapter access a network. network layer The layer of a network protocol stack that is concerned with addressing and delivery of datagrams across a network or internet. It is layer three in the IS O/OSI seven-layer model. In the TCP/IP protocol stack, the main network layer protocol is the Internet Protocol (IP); therefore this layer is also known as internet layer. NFS Network File System A protocol (developed by Sun Microsystems) enabling a UN*X machine to mount a remote disk area as part of its local filesystem; widely considered of questionable security. NIS Network Information Protocols to provide network services (such as System authentication) for NFS. object code machine code Instructions that can be executed by the computer processor. offline off-line not connected to a computer system or network; cf. online online [1] on-line connected to a computer system or network; cf. offline online [2] on-line stored on and accessible through a computer system or network operating OS Central set of programs that manage the system various components and devices of the computer, and its interaction with application programs and users; e.g. MS-DOS, MSWindows NT, MacOS, Unix, Linux. OSI Open Systems The concept of a "stack" of protocols (hence Interconnection "TCP/IP stack" as in "This damn Microsoft TCP/IP stack is so broken...") is due to the OSI seven-layer model, even though TCP/IP has only about four distinct layers (certain layers are combined). See physical, data link, network, transport, session, presentation, and application layers (OSI model); network access, internet, transport, and application layers (TCP/IP stack).
136
Glosario de trminos Term outbound output owner package Deprecated Alternatives Comment
packet
Any data that are generated by a process. The account that has its UID number associated with a file. A set of related files and programs; especially a single archive file (tar, rpm) that contains them. A quantum of data transmitted over a network; specifically: a unit of TCP traffic carrying the information necessary to deliver itself, especially using the UDP protocol (datagram). Password Authentication Protocol Several bits at the same time, over time (over multiple wires). A variable with a specific value that has a meaning or function, which belongs to a program function or command; cf. argument. A process that started one or more other, socalled child processes. An arbitrary region of a storage device (almost always a hard drive) created by partitioning software before data were stored. Specifically on IBM PC-compatibles: one of up to four distinct areas on a hard drive which can be dedicated to different operating systems. One of the partition types, "extended", supports further "partitioning" into a maximum of four logical disks. To make a partition. A token which authenticates a user at login time.
Personal Computer
PCI peripheral
A computer designed to be used by one individual at a time; specifically, one compatible with the architecture of the original IBM microcomputer. A PC bus to connect cards to the processor, replacing the original ISA bus. A device that is an optional attachment to the core components of a computer (CPU and memory).
permission
137
Glosario de trminos Term physical layer Deprecated Alternatives Comment The lowest layer of the seven-layer ISO/OSI network protocol stack. Consists of the cables, connectors and associated hardware such as driver chips to implement a network such as Ethernet or Token Ring. The corresponding layer of the TCP/IP protocol stack is also known as "hardware" or network access layer and has a wider scope. A numerical identifier used to track processes by the kernel. A technique whereby the CPU executes a tightly coded loop in which it copies data from a peripheral device's buffer memory and writes it back out to main memory; used with earlier versions of ATA, but replaced by DMA. A data structure which connects a file handle in one process to a file handle in another; by convention stdout of one process to stdin of the next. Established on the shell command line by the '|' symbol. picture element: a dot, a grid point on a computer display, the smallest entity that can be drawn on a computer display IP protocol over a parallel cable (between two machines physically connected and not too distant). Set of Python scripts to offer a web-interface to manage the LPI test objectives. See http://www.lpi.org/cgi-bin/poms.py. Protocol to retrieve mail from a mail server. See RFC1939 (POP3). Various software servers typically have names derived from 'pop' like ipop3d, ipop2d, and popper. The name given to an individual, numbered "slot" which is available to Internetworking software. For example, HTTP servers generally listen to port 80. See /etc/services ; also see ioport. To adapt a computer program to operate in a new computing environment and|or in a new programming language.
PID PIO
pipe
pixel
PLIP
Parallel Line IP
PnP POMS
Plug and Play Program Objective Management System Post Office Protocol
POP
POSIX compliant
138
Glosario de trminos Term Postscript Deprecated Alternatives Comment A page Descripcin language developed and marketed by Adobe Inc. Widely implemented in laser printers, especially where high-quality output is required (e.g. photo typesetters) and, under Linux, widely emulated in software for non-Postcript printers. The PID of a process' parent process (cf. PID, parent , child process). A physical layer protocol (RFC1661) which can be used to encapsulate IP and other network protocols, making it an excellent way of extending LAN protocols to dial-in users. PPP comprises an HDLC-like framing protocol (RFC1662), a link control protocol, and a family of network control protocols, each of which corresponds to a network protocol which PPP can encapsulate. PPP can also use PAP or CHAP (RFC1994) for authentication. The sixth layer of the ISO/OSI seven-layer model, which specifies character representation (e.g. ASCII) and graphics formats, such as NAPLPS (North American Presentation Layer Protocols). In TCP/IP the , presentation layer is subsumed into the application layer, but perhaps the closest equivalent standards are ASN.1, ANSI and HTML/XML. A running program; an instance of program execution. The main component that makes a computer work; these days usually a "micro-processor" on a single silicon chip (cf. CPU) A sequence of instructions for the computer that implements an algorithm, especially when stored in a file in the form of either directly-executable object code, or source code for an interpreter or compiler. When loaded into memory and executed, the objectcode program typically becomes a process. An indication produced by a shell or application program that it is ready for further user commands or input. A definition of data structures and formats to be exchanged by two programs over a network.
PPID PPP
presentation layer
program
prompt
protocol
139
queue
RAM
RARP
A computer process, usually as part of a firewall, that relays a protocol between client and server computer systems, by appearing to the client to be the server and appearing to the server to be the client (adapted from RFC2828). A data structure which implements a first-in, first-out list; e.g. print queue, which contains a list of jobs to be printed in order. Random Access Memory Volatile, writable memory that a computer uses as its main memory. Comes in flavors like EDO, ECC, SDRAM, etc. which are not equivalent but from the perspective of a sysadmin are very similar under normal use. cf. ROM. Reverse Address A low-level protocol which, given a hardware Resolution Protocol, rarp (Ethernet MAC) address on the local network, returns the corresponding IP address. cf. ARP .
readme
RedHat, RH
regular expression
repeater
An important document that usually comes with a software package to call attention to important issues; usually has its name in capitals, so that it appears at the top of a directory listing. A commercial Linux distribution. superfluous; said of information in the contexts of compression, or the preservation of data integrity. A formal expression of a string pattern which can be searched for and processed by a pattern-matching program such as vi, grep, awk or perl. A device that propagates signals between cables; in case of computer networks it operates at the first, physical layer within the ISO/OSI model, and does not do packet filtering or makes routing decisions. cf. hub, bridge, router.
Despite the name, a "de facto" official specification of Internet protocols and standards. See http://www.rfc-editor.org/ or http://www.cis.ohiostate.edu/hypertext/information/rfc.html .
140
Glosario de trminos Term ROM Deprecated Alternatives Read Only Memory Comment Computer memory, usually involving some enduring medium like a silicon chip or a burnt laser disc which can be read but not altered; this is inconvenient when the data can change and, just to be confusing, some special ROMs can be modified under certain circumstances. cf. RAM. The administrative account (UID 0) on a *nix system that has all privileges; cf. superuser. The top-most or first or originating node or object (e.g.: root directory, "/"). The path across one or more networks from one host to another. To examine the destination network IP address in a datagram, and by consulting a table, direct the datagram to the next router along the path to the destination, or to the destination itself. A gateway which directs IP datagrams between networks in an internet; it operates at the third, network layer in the ISO/OSI model, and assumes that the address implies a particular path (the route) to reach the destination. In common usage today, a gateway is a general-purpose computer with a general-purpose operating system [e.g. Linux] which *may* be performing other functions; while a router is a special-purpose computer with a special purpose operating system [e.g. IOS], generally from a specialist supplier [e.g. Cisco]). cf. bridge. A system which eases installation, verification, upgrading, and uninstalling Linux packages. See the HOWTO for more information. To let it work (a program); cf. execute. Mode of operation of a Unix system, offering different services on each level; see /etc/inittab . A computer program that is written in an interpreted programming language, and therefore stays in human-readable text format; cf. executable, binary.
root [1] root [2] route [1] (noun) route [2] (verb)
router
RPC RPM
run runlevel
run-level
scan script
141
Glosario de trminos Term SCSI Deprecated Comment Alternatives Small Computer Systems A multi-drop bus cable architecture Interface particularly suitable for both internal and external attachment of mass storage devices such as hard drives, tape drives and CDROMS. A (limited) length of cable - segments can be joined by repeaters (rare), bridges (common), routers or switches (which are hardware logic bridges and routers). One bit after another, over time (over a single wire). A process, or a host computer, which provides a particular service to client processes; e.g. web server, print server. A process which accepts requests and returns responses in an almost endless loop; a daemon. The fifth ISO/OSI layer is the session control layer. It establishes and controls systemdependent aspects of communications sessions between specific nodes in the network. It bridges the gap between the services provided by the transport layer and the logical functions running on the operating system in a participating node. In the TCP/IP network stack, there is no session control layer, and its functions are partially implemented in the transport layer and partially in the application layer. Set Group ID, sgid A program which mediates between the user and the operating system, typically accepting commands and invoking the corresponding programs. In the UNIX world, the term shell is conventionally applied to command-line driven interfaces with scripting capabilities, such as bash, csh and zsh; however, graphical shells exist, such as Windowmaker, KDE and GNOME. A logical interrupt to a process, which the process must generally deal with synchronously. A form of interprocess communications. single user mode, runlevel 1
sector segment
serial server
service
session layer
shutdown signal
single mode
142
Glosario de trminos Term SLIP Deprecated Alternatives Serial Line IP Comment A way of encapsulating IP datagrams for transmission over asynchronous modem connections. See RFC1055, "A Non-Standard for Transmission of IP Datagrams over Serial Lines"; cf. PPP A Microsoft protocol developed to transport originally MS-DOS, later OS/2 and MSWindows, API calls and their arguments across a NetBIOS LAN; primarily used under Linux as a protocol for file and print sharing with Windows machines A conversational protocol used by mail servers for delivery of e-mail over the Internet. See RFC821. The relative amount of useful information in a signal, as compared to the noise it carries. A TCP application layer connection. computer programs The plain text (usually typed in by a human) specifying the detailed operation of a program, written in a programming language. It needs to be processed by a compiler to produce a program that can be run (executed) by the computer. The files containing the source code for a program or program system, from which the executable program or library can be built or ported to another computer platform. To create a child process by means of a fork() and an exec().
SMB
SMTP
Signal-to-Noise-Ratio
SW
sources
The standard Unix error output device (by default to the terminal display). The standard Unix input device (by default the terminal keyboard). The standard Unix output device (by default the terminal display). A permission bit on an executable file which causes the kernel to keep the memory image of the process after it has terminated, in order to avoid the overhead of reloading it when it is re-invoked.
143
Glosario de trminos Term stream Deprecated Alternatives Comment A sequence of data bytes with sequencing and flow control. The TCP/IP stream protocol is TCP (Isn't there a System V stream concept as . well as the network protocol? Does Linux implement it?) A value used in configuring the TCP/IP stack which specifies which part of a 32-bit IP address is the network address and which part the host address. A permission bit for files in Unix-compatible filesystems which causes the resultant process (i.e., assuming the file is executable) to enjoy access rights to other resources based on the UID of the user who owns the file, rather than the user who created the process. The user of the root account. A commercial Linux distribution. virtual memory; called swap space because processes swap location between fast RAM and slow virtual memory if their priority changes. a two-state (on|off) input device In computer networks, a bridge or router that uses dedicated hardware to quickly shunt packets through the network. Symbolic link: in Unix filesystems, an entry in a directory that points to another file name in the filesystem; cf. hard link. To make the events in two separate sequences happen at the same time (used in communications). To make the content and state of data stored in two separate locations identical (e.g. cache, FTP sites). The formal rules which determine how keywords or commands and their components need to be combined when writing the source code of a computer program or forming shell commands. system administrator: a person who administers a computer system and keeps it working. A computer system; a term loosely used to refer to hardware and | or software: cf. operating system.
subnet mask
mask
SUID
symlink
soft link
sysadmin
sysadm
system
box
144
Glosario de trminos Term TCP Deprecated Alternatives Transmission Control Protocol Comment A session-oriented streaming transport protocol which provides sequencing, error detection and correction, flow control, congestion control and multiplexing; cf. UDP . See RFC793. A suite of protocols basic to Internet transmissions. The outlet of a computer, usually consisting of a display for output of text (or possibly graphics), and a keyboard (and possibly a mouse) for input, used as a device for interaction between the computer and a user. cf. workstation. to disconnect, end, finish, quit, stop, etc. A resistive load to indicate the end a chain of devices, usually a SCSI chain or a coax network chain. A series of characters that can be displayed on a terminal display or printed on paper for human reading. Set of Python scripts to offer a web-interface to manage the LPI test items. See http://www.lpi.org/cgi-bin/tips.py. A protocol like FTP but much simpler and even less secure; used mainly for cracking computers and booting diskless network clients. See RFC1350.
TCP/IP
terminal
terminate terminator
text
TIPS
TFTP
transport layer
As used with computer networks: the schematic shape formed by the connections between the hosts. The transport layer is the central layer (#4) in the ISO/OSI seven-layer model. It provides end-to-end control of a communication session once the path has been established, allowing processes to exchange data reliably and sequentially, independent of which systems are communicating and their locations in the network. The transport layer in the TCP/IP stack is not defined in the same way; although TCP provides sequencing and error correction, UDP - which is also a transport layer protocol - does not have a session concept and is unreliable. The TCP/IP transport layer primarily provides multiplexing through the use of ports.
145
Glosario de trminos Term troubleshoot Deprecated Alternatives Comment The process of finding the reason(s) of the problem(s) with networking|programming| hardware. To make small changes to configuration in order to produce more efficient operation. A commercial Linux distribution.
tune TurboLinux
Pacific HighTech Linux, PHT UDP User Datagram Protocol A connection-less, unreliable, transport protocol which provides multiplexing and error detection for applications which require a low-cost protocol for one-shot transactions; cf. datagram, packet, TCP See RFC768. . UID User ID UN*X A term for any variant of the UNIX(R)(TM) operating system, including Linux and a large number of free and commercial systems; also *NIX. uninstall Remove hardware or software from a computer system. unload Remove services or software from a server so that more resources (CPU time, disk space, etc.) become available. unreliable In the TCP/IP sense of the term, a protocol which does not perform error correction (relying on "upper" layers to detect and correct errors, usually through retransmission). upgrade To update hardware or software to a better state. URL Universal Resource An identifier for an address on the Internet, Locator preceded by the name of the protocol that must be used to reach that address (e.g.: ftp://ftp.kernel.org/ ). USB Universal Serial Bus A recently developed bus standard for connecting peripheral devices in a chain. user [1] The person that is using the resources of a computer. user [2] A person's account or process; identification listed in /etc/passwd . user interface UI, GUI see interactive interface user mask mask UTC Coordinated Universal Official world time. Time, GMT, Greenwich Mean Time utility A program to help you to do a task easier.
146
Glosario de trminos Term Deprecated Comment Alternatives UTP Unshielded Twisted Pair Type of network cables with several parallel wires used for Ethernet. The network usually has a star topology with hubs and does not need terminators. variable length VLSM cf. CIDR subnet mask vendor A company that provides a service or a product. virtual Functionality provided without additional hardware|software, often without the user needing to realize this economy; e.g.: virtual memory, virtual console or virtual web server. virtual console virtual terminal, VT, VC virtual VM Extra memory available on a system that is memory stored on a hard disk and is therefore essentially unlimited, although much slower than genuine RAM. Usually it is called swap space. WAN Wide Area Network A network which links geographically widespread facilities (and often LANs at those locations) using point-to-point (leased line, SLIP PPP) or packet-switched network (X.25, , frame relay) links and which does not support the broadcast and direct connection capabilities of LANs. widget wildcard An placeholder used to represent any character or group of characters. window A region on a graphical desktop, the user interface for I/O with a child process of the desktop. win-modem A modem that only has a Digital Signal Processor and uses MS-Windows-specific software running on the CPU of the host computer to encode and decode data. WINS Windows Internet Name An automatic NetBIOS name database to Service resolve NetBIOS names to IP addresses. word A data type consisting of two or four (or a different number - you cannot tell) of bytes On i386 architectures, a word is four bytes (32 bits) in size. workspace Computer resources that are assigned to a computer user. workstation A computer, usually with a graphical display, for interactive use by an individual; cf. server. write permission
147
Glosario de trminos Term WWW X Deprecated Alternatives World Wide Web, (the) web X-Windows Comment Global distributed archive of HTML documents linked through HTTP . The X Window System: a graphical user interface originating at MIT and having several variations.
148