LPIC 101 Version 5
Este libro es un conjunto de blogs, libros y posts que he encontrado en Internet
Mi idea y mi deseo es hacer un libro opensource sobre la certificación LPIC 1 de la versión 5, recién salida este Noviembre del 2018.
El problema es que ninguna editorial esta sacando la version 5 y ademas d eso son carisimos. Que mejor que algo comunitario que se actualiza solo y poder imprimirlo por unos 15€.
Linux al fin y al cabo tambiem empezo asi 😉
Espero la colaboracion de cualquiera que pueda ampliarlo, mejorarlo y/o actualizarlo.
Me podeis pedir solicitud como colaborador enviandome un email a:
duven@protonmail.com
1 Introducción
2 Información de la versión
3 Exámenes
4 Adición
5 Traducciones de objetivos
6 Objetivos: Examen 101
Tema 101: Arquitectura del sistema
101.1 Determinar y configurar los ajustes de hardware
101.2 Arrancar el sistema
101.3 Cambiar los niveles de ejecución / objetivos de arranque y apagar o reiniciar el sistema
Tema 102: Instalación de Linux y gestión de paquetes
102.1 Diseño de la distribución del disco duro
102.2 Instalar un gestor de arranque
102.3 Administrar bibliotecas compartidas
102.4 Usar la gestión de paquetes de Debian
102.5 Utilizar la gestión de paquetes RPM y YUM
102.6 Linux como invitado de virtualización
Tema 103: Comandos GNU y Unix
103.1 Trabajo en la línea de comandos
103.2 Procesar flujos de texto utilizando filtros
103.3 Realizar la gestión básica de archivos
103.4 Usar flujos, tuberías y redirecciones
103.5 Crear, monitorear y matar procesos
103.6 Modificar las prioridades de ejecución del proceso
103.7 Buscar archivos de texto usando expresiones regulares
103.8 Edición de archivos básicos
Tema 104: Dispositivos, Sistemas de Archivos Linux, Estándar de Jerarquía de Sistemas de Archivos
104.1 Crear particiones y sistemas de archivos
104.2 Mantener la integridad de los sistemas de archivos
104.3 Controlar el montaje y desmontaje de sistemas de ficheros
104.4 Eliminado
104.5 Administrar los permisos y la propiedad de los archivos
104.6 Crear y cambiar enlaces duros y simbólicos
104.7 Buscar archivos de sistema y colocarlos en la ubicación correcta
7 Objetivos: Examen 102
Tema 105: Shells y Scripts de Shell
105.1 Personalizar y usar el entorno del shell
105.2 Personalizar o escribir scripts simples
Tema 106: Interfaces de usuario y escritorios
106.1 Instalar y configurar X11
106.2 Escritorios gráficos
106.3 Accesibilidad
Tema 107: Tareas administrativas
107.1 Administrar cuentas de usuario y de grupo y archivos de sistema relacionados
107.2 Automatizar las tareas de administración del sistema mediante la programación de tareas
107.3 Localización e internacionalización
Tema 108: Servicios esenciales del sistema
108.1 Mantener la hora del sistema
108.2 Registro del sistema
108.3 Conceptos básicos del Agente de transferencia de correo (MTA)
108.4 Gestión de impresoras e impresión
Tema 109: Fundamentos de Redes
109.1 Fundamentos de los protocolos de Internet
109.2 Configuración de red persistente
109.3 Solución de problemas básicos de red
109.4 Configurar DNS del lado del cliente
Tema 110: Seguridad
110.1 Realizar tareas de administración de seguridad
110.2 Configurar la seguridad del host
110.3 Protección de datos con cifrado
8 Preguntas de examenes oficiales 101
9 Pregunas de examenes oficiales 102
1. Introducción.
Este libro es un conjunto de blogs, libros y posts que he encontrado en Internet
Mi idea y mi deseo es hacer un libro opensource sobre la certificación LPIC 1 de la versión 5, recién salida este Noviembre del 2018
Espero la colaboracion de cualquiera que pueda ampliarlo, mejorarlo y/o actualizarlo.
Me podeis pedir solicitud como colaborador enviandome un email a:
duven@autistici.org
Las fuentes que de momento voy a usar seguro son:
https://nebul4ck.wordpress.com/lpic-1-400/
https://www.neuronasdigitales.com/lpic-101-1-determinar-y-configurar-el-hardware.html
http://acacha.org/mediawiki/Linux_Professional_Institute_Certificate_1_(LPIC-1)._Examen_101_(Curs)
2. Infomacion de la version.
Los cambios de entre la version 4 y la 5 se pueden consultar aqui:
https://wiki.lpi.org/wiki/LPIC-1_Summary_Version_4.0_To_5.0
Los siguientes cambios constituyen la actualización del examen 101 de la versión 4.0 a la versión 5.0:
101: Arquitectura del sistema
101.1 Determinar y configurar los ajustes de hardware
Eliminado ‘Configurar sistemas con o sin periféricos externos como teclados’.
Eliminado ‘Conozca las diferencias entre los dispositivos de conexión en frío y los de conexión en caliente’.
101.2 Arrancar el sistema
Añadida cobertura de UEFI (igual a la cobertura de la BIOS) y journalctl (con respecto a los eventos de arranque)
101.3 Cambiar los niveles de ejecución / objetivos de arranque y apagar o reiniciar el sistema
Mayor conciencia de la diabetes tipo 2.
102: Instalación de Linux y gestión de paquetes
102.1 Diseño de la distribución del disco duro
Añadida la Partición de Sistema EFI (ESP)
102.2 Instalar un gestor de arranque
(sin cambios)
102.3 Administrar bibliotecas compartidas
(sin cambios)
102.4. Utilizar la gestión de paquetes de Debian
Aptitud eliminada
Añadido el conocimiento de apt.
102.5 Usar la administración de paquetes RPM y YUM
Removido yumdownloader
Añadido Zypper (igual a YUM)
Añadido el conocimiento de dnf
102.6 Linux como invitado de virtualización
Nuevo objetivo (peso: 1)
Añadidas las especialidades de ejecutar Linux en máquinas virtuales y contenedores en premisa y en la nube.
103: Comandos GNU y Unix
103.1 Trabajo en la línea de comandos
Añadido quoting
Añadido type y which
103.2 Procesar flujos de texto utilizando filtros
Disminución del peso de 3 a 2
Eliminado expandir, fmt, join, pr y unexpand
Añadido bzcat, md5sum, sha256sum, sha512sum, xzcat y zcat
103.3 Realizar la gestión básica de archivos
Añadido bunzip2 y unxz
103.4 Usar flujos, tuberías y redirecciones
(sin cambios)
103.5 Crear, monitorear y matar procesos
Añadido watch y tmux
103.6 Modificar las prioridades de ejecución del proceso
(sin cambios)
103.7 Buscar en archivos de texto usando expresiones regulares
Aumento de peso de 2 a 3
Añadida la comprensión de las diferencias entre las expresiones regulares básicas y extendidas
Añadida la comprensión de los conceptos de caracteres especiales, clases de caracteres, cuantificadores y anclas.
Añadido el uso de expresiones regulares para borrar, cambiar y sustituir texto
103.8 Edición de archivos básicos
Cambiar el nombre de ‘Realizar operaciones básicas de edición de archivos usando vi’ a “Edición de archivos básicos”.
Se ha aclarado la redacción de “Comprender y usar los modos vi”.
Se han eliminado los comandos vi c y :e!
Añadido el conocimiento de otros editores comunes (Emacs, nano y vim) y la configuración del editor por defecto (variable de entorno EDITOR).
104: Dispositivos, Sistemas de Archivos Linux, Estándar de Jerarquía de Sistemas de Archivos
104.1 Crear particiones y sistemas de archivos
Eliminado el conocimiento de ReiserFS
Añadidas tablas de particiones GPT
Añadido exFAT
Cambiado el conocimiento de Btrfs a’Conocimientos básicos de las características de Btrfs, incluyendo sistemas de archivos multidispositivo, compresión y subvolúmenes’.
104.2 Mantener la integridad de los sistemas de archivos
Eliminados debugfs y dumpe2fs
Cambiado ‘Herramientas XFS (como xfs_metadump y xfs_info)’ a cobertura de xfs_repair, xfs_fsr y xfs_db
104.3 Controlar el montaje y desmontaje de sistemas de ficheros
Añadido el uso de etiquetas y UUIDs para identificar y montar sistemas de archivos.
Mayor conocimiento de las unidades de montaje systemd
Añadido blkid e lsblk
104.4 Administrar cuotas de disco
Objetivo eliminado (peso anterior: 1)
104.5 Administrar los permisos y la propiedad de los archivos
(sin cambios)
104.6 Crear y cambiar enlaces duros y simbólicos
(sin cambios)
104.7 Encontrar archivos de sistema y colocarlos en la ubicación correcta
(sin cambios)
Cambios en el examen 102
Los siguientes cambios constituyen la actualización del examen 102 de la versión 4.0 a la versión 5.0:
105: Shells y secuencias de comandos de Shell
Cambiado el nombre de’Shells, Scripting and Data Management’ a’Shells and Shell Scripting’.
105.1 Personalizar y usar el entorno del shell
Listas eliminadas
105.2 Personalizar o escribir scripts simples
Añadida la ejecución de comandos encadenados
Añadido && y |||
105.3 Gestión de datos SQL
Objetivo eliminado (peso anterior: 2)
106: Interfaces de usuario y escritorios
106.1 Instalar y configurar X11
Se ha eliminado la comprobación de que la tarjeta de vídeo y el monitor son compatibles con un servidor X.
Eliminado el conocimiento del servidor de fuentes X
Eliminado xwininfo
Eliminado xpdyinfo
Añadida la comprensión de la arquitectura X11
Añadido sobreescribir aspectos específicos de la configuración de Xorg, como el diseño del teclado.
Mayor comprensión de los componentes de los entornos de escritorio, como los administradores de pantallas y de ventanas.
Se ha añadido la gestión del acceso al servidor X y a las aplicaciones de visualización en servidores X remotos.
Añadido el conocimiento de Wayland.
Añadido /etc/X11/xorg.conf.d/
Añadido ~/.xsession-errors
Añadido xauth
106.2 Sobremesas gráficas
Eliminado el contenido antiguo (configuración de los gestores de pantalla / LightDM)
Cambiado para cubrir el conocimiento de los principales entornos de escritorio y protocolos para acceder a sesiones de escritorio remotas.
Añadido KDE, Gnome, Xfce, X11, XDMCP, VNC, Spice y RDP
106,3 Accesibilidad
Eliminado Conocimientos básicos sobre la configuración de la accesibilidad del teclado (AccessX)
Eliminado Orca, GOK y emacspeak
Añadido reconocimiento de voz
107: Tareas administrativas
107.1 Administrar cuentas de usuario y de grupo y archivos de sistema relacionados
(sin cambios)
107.2 Automatizar las tareas de administración del sistema mediante la programación de tareas
Se ha eliminado el anacron
Añadidos temporizadores systemd
Añadido systemctl y systemd-run
107,3 Localización e internacionalización
(sin cambios)
108: Servicios esenciales del sistema
108.1 Mantener la hora del sistema
Añadido chrony (chronyc)
Añadido timedatectl
108.2 Registro del sistema
Aumento de peso de 3 a 4
Eliminado klogd y syslogd (syslog.conf)
Cambiado el syslog de tema principal a awareness
Cambiado el rsyslog de conciencia a tema principal, el enfoque es la configuración básica
Se agregó el acceso al diario del sistema, incluyendo consultas, filtros, almacenamiento persistente, eliminación de eventos antiguos y recuperación del contenido del diario desde una copia del sistema.
Añadida la comprensión de la interacción de rsyslog con systemd-journald
Añadido systemd-cat
108.3 Fundamentos del agente de transferencia de correo (MTA)
qmail eliminado
108.4 Gestión de impresoras e impresión
(sin cambios)
109: Fundamentos de Redes
109,1 Fundamentos de los protocolos de Internet
(sin cambios)
109.2 Configuración de red persistente
Cambiar el nombre de’Configuración básica de red’ a’Configuración de red persistente’.
Cambiado el enfoque de ver los ajustes para administrar la configuración de red persistente.
Eliminada ip, route, ping, ifconfig (aún en 109.3)
Añadida configuración de red ethernet y wi-fi usando NetworkManager
Añadido el conocimiento de la red de sistemas
Añadido /etc/resolv.conf, nmcli y hostnamectl
109.3 Solución de problemas básicos de red
Cambiado para centrarse en la interacción manual con interfaces de red utilizando iproute2
Cambió la cobertura de los comandos de las herramientas de la red a la concienciación
Extirpada la excavación y el huésped (aún en 109.4)
Eliminado ifup y ifdown (aún en 109.2)
Añadido ss
109.4 Configurar DNS del lado del cliente
Añadidos errores de depuración relacionados con la resolución de nombres
Añadido systemd.socket
Mayor conocimiento de los problemas resueltos por el sistema
110: Seguridad
110.1 Realizar tareas de administración de seguridad
(sin cambios)
110.2 Configurar la seguridad del host
Eliminado /etc/inetd.d/
Eliminado /etc/inetd.conf
110.3 Protección de datos con cifrado
Aumento de peso de 3 a 4
Añadido el uso de GPG para encriptar, descifrar, firmar y verificar archivos.
Agregado gpg-agente
Añadidas cifras adicionales para las claves SSH (~/.ssh/id_ecdsa, id_ecdsa.pub, ~/.ssh/id_ed25519, id_ed25519.pub, /etc/ssh/ssh_host_ecdsa_key, ssh_host_ecdsa_key.pub, /etc/sshssh/sshost_ed25519_key y ssh_host_host_ed25519_key.pub)
3. Exámenes
Para obtener la certificación LPIC-1, el candidato debe aprobar los exámenes 101 y 102.
Se han creado 300 pregunas por cada examen y se preguntan 60 de ellas.
Con lo cual si encuentras en Internet tests con mas d 300 preguntas, ten por seguro que algunas estaran obsoletas o te han mezclado preguntas de otros exámenes.
La máxima puntuacion son 800 puntos.
6. Objetivos: Examen 101
Tema 101: Arquitectura del Sistema
101.1 Determinar y configurar los ajustes de hardware
Importancia 2
Descripción
Los candidatos deberán ser capaces de determinar y configurar el hardware fundamental del sistema.
Áreas de conocimiento clave:
- Activar y desactivar los periféricos integrados.
- Diferenciar entre los distintos tipos de dispositivos de almacenamiento masivo.
- Determinar los recursos de hardware para los dispositivos.
- Herramientas y utilidades para listar la información de hardware (por ejemplo, lsusb, lspci, etc.).
- Herramientas y utilidades para manipular dispositivos USB.
- Comprensión conceptual de sysfs, udev y dbus.
La siguiente es una lista parcial de los archivos, términos y utilidades utilizados:
- /sys/
- /proc/
- /dev/
- modprobe
- lsmod
- lspci
- lsusb
Un sistema operativo es el software que hace de enlace entre las aplicaciones de usuario y el hardware. La finalidad de un sistema operativo es ofrecer un conjunto de programas que permetin hacer más fácil y eficiente el uso de un ordenador. Actualmente un ordenador es una máquina compleja que consta de uno o más procesadores, memoria de diferentes tipologías, relojes, periféricos, etc y además son sistemas donde puede trabajar más de uno usuario. Es evidente que se hace necesario que haya alguna solución que permita hacer uso de un ordenador sin necesidad de dominar la complejidad del hardware.
Arquitectura de un sistema operativo
Partes de un sistema operativo:
-Núcleo: es la interfaz de comunicación entre el hardware y el software. – Aplicaciones base: aplicaciones básicas para el correcto funcionamiento del sistema. La mayoria de aplicaciones son GNU
Dos espacios de trabajo:
– Modo supervisor o modo kernel: No tiene restricciones de acceso a la memoria y puede acceder a cualquier dirección, de cualquier proceso, o de cualquier dispositivo. Reservado para el uso del núcleo, de su módulos o de algunos de sus controladores. Programar en este espacio es muy complicado. Se ha de tener mucho cuidado de no interferir entre los diferentes espacios de memoria de procesos. Se ha de diseñar el programa con la idea de no fallar nunca, puesto que un error en el programa implica un error en todo el sistema.
– Modo de usuario o espacio de usuario: En contraste, el espacio de usuario es la zona donde se ejecutan las aplicaciones de usuario. En la mayoría de sistemas operativos actuales cada proceso tiene su propio espacio de memoria y no puede acceder al espacio de memoria de otros procesos y de esta manera se evita la interferencia entre procesos. La única forma en que un proceso del espacio de usuario puede acceder a la memoria de otros procesos es a través de las llamadas de sistema (interfaces) del sistema operativo, de forma que el sistema operativo puede gestionar el control de acceso a los recursos.
Módulos – Gestión del Hardware
Los controladores o drivers se encargan del acceso controlado al hardware. La mayoría de controladores son módulos del kernel. Estos pueden estar integrados en el mismo núcleo o cargarse en caliente. Se almacenan en /lib/modules y los que están disponibles para nuestro kernel están en \$ /lib/modules/`uname -r`. Las herramientas necesarias para la gestión de los módulos se encuentran en el paquete module-init-tools que por regla general se encuentra incluido en la mayoría de distribuciones. Las principales herramientas son: – lsmod: Muestra la información de /proc/modules. La columna used indica cuantos módulos dependen de ese módulo.
- insmod: inserta un módulo en el kernel. Si el módulo depende de otros, las dependencias deben estár cargadas antes de ejecutar insmod.
- modprobe: inserta un módulo en el kernel y carga automáticamente los módulos que dependen de éste. En la carpeta /etc/modprobe.d/ se puede configurar las opciones a la hora de cargar un módulo, o definir una lista negra para especificar que no se cargue un módulo concreto
- modinfo: muestra la información detallada de un módulo. Interesante para ver en que ruta se encuentra el fichero, o para averiguar para que sirve.
- rmmod: eliminar un módulo del kernel. Se puede incluir en el fichero /etc/modules que módulos queremos cargar manualmente durante el inicio del sistema. El script que se encarga de esta tarea es /etc/init.d/module-init-tools
- depmod: Establece las dependencias entre módulos. Se ejecuta unicamente durante el inicio de sistema. Solo lo ejecutaremos manualmente si modificamos la configuración de los módulos, como modificar el fichero modules.conf o de las carpetas modules.d. Genera el fichero /lib/modules/(kernel-version)/modules.dep
Dispositivos PCI
Antes de la aparición del sistema PnP (mediados de los 90), era tedioso configurar el hardware y a menudo se debía recurrir a los jumpers o a la BIOS. Actualmente la configuración se puede hacer por software y a menudo no hace falta configurar nada ya que gracias a PnP, los dispositivos se configuran solos. Se puede modificar los comportamiento del núcleo con respecto a la detección de hardware cambiando los siguientes parámetros u opciones del núcleo: PCI Devices –> Bus Options –> PCI Access Mode Tenemos 4 opciones: – BIOS – MMConfig – Direct – Any-> Que quiere decir primero MMconfig, después Direct y finalmente BIOS. Es la opción habitual. lspci: muestra información sobre los dispositivos PCI y otros dispositivos del sistema.
$ lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
[……..]
si escribimos:$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation 2nd Generation Core Processor Family DRAM Controller [8086:0104] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09)
00:16.0 Communication controller [0780]: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 [8086:1c3a] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 05)
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 05)
Vemos que cada dispositivo tiene un id único. El formato es: [código] -> [dispositivo:fabricante]. Esta información la extrae del fichero /usr/share/misc/pci.ids y se puede actualizar con el comando update-pciids
Dispositivos USB
En Linux hay diferentes drivers o controladores USB con nombres como UHCI, OHCI, EHCI o R8A66597. La mayoría de sistemas operativos Linux modernos vienen con los drivers USB ya cargados y la gestión de dispositivos USB es automática. Algunos controladores son solo para la versión 1.1 de USB, pero la mayoría también soportan 2.0. Hay que tener en cuenta que una cosa es el bus de comunicación USB y otro el dispositivo que hay conecta, de tal manera que pueden ser necesarios otros drivers o aplicaciones para los usos concretos de cada dispositivo (impresoras, escanners, cámaras digitales…). Si con dispositivo PCI tenemos el comando lspci con USB disponemos del comando lsusb que nos muestra los dispositivos USB que tenemos conectados:
$ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 002: ID 03f0:0324 Hewlett-Packard
Bus 007 Device 003: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[……..]
Antes se gestionaban con las utilidades usbmgr, hotplug, udev…. Desde los kernels 2.6 no es necesario, puesto que integra hotplug y utiliza udev
Sistemas de ficheros especiales
/sys
Sysfs es un sistema de ficheros virtual (solamente existe en RAM) proporcionado por el núcleo del sistema desde la versión 2.6 (año 2003). Sysfs exporta información sobre los dispositivos y sus controladores (drivers) desde el espacio de sistema del núcleo al espacio de usuario. Sysfs apareció durante el desarrollo del núcleo 2.5 (las ramas impares siempre son las de pruebas) con la intención de solucionar los siguientes problemas:
- Falta de un método unificado para representar las relacionas entre los controladores y los dispositivos de hardware.
- Faltaba un mecanismo de soporte hotplug estandar
- procfs estaba pleno de información que no estaba relacionada con los procesos.
Muchas aplicaciones dependen de sysfs para funcionar (p. ej. udev o HAL). Utilizan este sistema de ficheros virtual para acceder a información del hardware y de los controladores del hardware (normalmente módulos del núcleo). En la estructura de la carpeta /sys los directorios organizan los dispositivos, las clases, los buses, los controladores etc. y también establecen las relaciones entre ellos. Los ficheros contienden atributos (cada fichero un atributo).
Carpetas principales:
/sys/devices: Contiene la información de los dispositivos. La mayoría de ficheros del resto de directorios son enlaces simbólicos que apuntan aquí.
/sys/bus: Información de los buses de comunicaciones (USB, PCI….) Los drivers están en /sys/bus/pci/drivers
/sys/block: Dispositivos de bloque. Son enlaces simbólicos a ficheros de la carpeta /sys/devices
/sys/class: muestra los dispositivos agrupados por clases (red, sonido, impresoras….)
/proc procfs es un sistema de ficheros virtual, generado dinánicamente durante el arranque de sistema y almacenado en RAM. Contiene la información de los procesos proporcionada por el núcleo de Linux. Actualmente, además de procesos, contiene información sobre el hardware. Muchas aplicaciones de espacio de usuario se basan en /proc para acceder a la información del núcleo del sistema. Ejemplos: /proc/interrupts /proc/dma /proc/ioports En procfs, cada proceso tiene una carpeta propia, llamados por su PID. En ella contiene información detallada sobre cada uno de ellos. La herramienta sysctl permite modificar los parámetros del kernel sin necesidad de recompilar. Los parámetros se encuentran en forma de ficheros, en /proc/sys. Se puede consultar un listado de todos los parámetros con \$sysctl -a
/dev
Device file system permite al software interactuar con los dispositivos hardware utilizando las mismas llamadas de sistema que se utilizarían para trabajar con ficheros. Hacen de interfaz con los controladores de los dispositivos. Los ficheros pueden ser:
- Periféricos, como impresoras
- Dispositivos de almacenamiento
- Particiones
- Dispositivos especiales (generadores de números aleatorios, ceros….)
- Existen tres tipos especiales de dispositivo:
- Dispositivos de caracteres: les llega el flujo de datos de caracter en caracter. (ttys)
- Dispositivos de bloque: les llega el flujo de datos en bloques. Soportan acceso aleatorio a los datos. (hds)
- Pseudo-dispositivos: no corresponden a ningún hardware específico.
- /dev/null: Acepta todo tipo de datos de entrada y los descarta. No produce ninguna salida
- /dev/full: Dispositivo que siempre está lleno
- /dev/loop: Dispositivo de bucle
- /dev/zero: Produce un flujo de datos continuo de caracteres NULL (cero
- /dev/random: Produce un flujo de datos de números aleatorios. Bloquea
- /dev/urandom: Produce un flujo de datos de números aleatorios. No bloquea. Convención de nombres:
- fb: frame buffer
- fd: disquete
- hd: disco duro
- lp: impresora
- ttyUSB: conversor serie-usb
- ttyS: controlador del puerto serire
- parport,pp: puerto paralelo
- pt: pseudo terminales
- sd: controlador de dispositivo de almacenamiento masivo. sda: primer dispositivo registrado. sda1: primera partición del primer dispositivo registrado
- sg: controlador SCSI genérico
- sr: controlador ROM (dispositivos ópticos)
- st: controlador de cintas magnéticas
- tty: consolas virtuales
8 Preguntas de examenes oficiales 101
101-400
Number: 101-400
Passing Score: 800
Time Limit: 120 min
File Version: 4.0
101-400
LPI Level 1 Exam 101, Junior Level Linux Certification, Part 1 of 2
Sections
1.System Architecture
2.Linux Installation and Package Management
3.GNU and Unix Commands
4.Devices, Linux Filesystems, Filesystem Hierachy Standard
gratisexam.com-LPI.ActualTests.101-400.v2016-09-07.by.FuTy.102q
gratisexam.com-LPI.Dumps.101-400.v2015-08-06.by.Exampass.85q
LPI.Passit4sure.101-350.v2015-03-10.by.Floy (Deberian eliminarse)
LPI.Testking.101-350.v2015-03-14.by.Altha (Deberian eliminarse) LPI.Selftestengine.117-101.v2015-04-03.by.Rufus gratisexam.com-LPI.Pass4sure.117-101.v2015-03-06.by.Paul
QUESTION 1
Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination?
A./etc/keys
B./proc/keys
C./etc/inittab
D./proc/inittab
E./etc/reboot
QUESTION 2
Which of the following information is stored within the BIOS? (Choose TWO correct answers.)
A.Boot device order
B.Linux kernel version
C.Timezone
D.Hardware configuration
E.The system’s hostname
QUESTION 3
Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.)
A.shutdown -r now
B.shutdown -r "rebooting"
C.telinit 6
D.telinit 0
E.shutdown -k now "rebooting"
QUESTION 4
Which of the following are init systems used within Linux systems? (Choose THREE correct answers.)
A.startd
B.systemd
C.Upstart
D.SysInit
E.SysV init
QUESTION 5 : SIMULATION
Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.)
QUESTION 6
What information can the lspci command display about the system hardware? (Choose THREE correct answers.)
A.Device IRQ settings
B.PCI bus speed
C.System battery type
D.Device vendor identification
E.Ethernet MAC address
QUESTION 7
Which of the following commands brings a system running SysV init into a state in which it is safe to perform maintenance tasks? (Choose TWO correct answers.)
A.shutdown -R 1 now
B.shutdown -single now
C.init 1
D.telinit 1
E.runlevel 1
QUESTION 8
What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init?
A./lib/init.so
B./sbin/init
C./etc/rc.d/rcinit
D./proc/sys/kernel/init
E./boot/init
QUESTION 9 : SIMULATION
Which command will display messages from the kernel that were output during the normal boot sequence?
QUESTION 10
Which of the following commands will write a message to the terminals of all logged in users?
A.bcast
B.mesg
C.print
D.wall
E.yell
QUESTION 11
Which of the following kernel parameters instructs the kernel to suppress most boot messages?
A.silent
B.verbose=0
C.nomesg
D.quiet
QUESTION 12
Which of the following options for the kernel’s command line changes the systemd boot target to rescue.target instead of the default target?
A.systemd.target=rescue.target
B.systemd.runlevel=rescue.target
C.systemd.service=rescue.target
D.systemd.default=rescue.target
E.systemd.unit=rescue.target
QUESTION 13
After modifying GNU GRUB’s configuration file, which command must be run for the changes to take effect?
A.kill -HUP $(pidof grub)
B.grub-install
C.grub
D.No action is required
QUESTION 14
Which of the following commands is used to update the list of available packages when using dpkg based package management?
A.apt-get update
B.apt-get upgrade
C.apt-cache update
D.apt-get refresh
E.apt-cache upgrade
QUESTION 15
Which of the following commands can be used to download the RPM package kernel without installing it?
A.yum download –no-install kernel
B.yumdownloader kernel
C.rpm –download –package kernel
D. rpmdownload kernel
QUESTION 16
When using rpm –verify to check files created during the installation of RPM packages, which of the following information is taken into consideration? (Choose THREE correct answers.)
A.Timestamps
B.MD5 checksums
C.Inodes
D.File sizes
E.GnuPG signatures
QUESTION 17
Which of the following is correct when talking about mount points?
A.Every existing directory can be used as a mount point.
B.Only empty directories can be used as a mount point.
C.Directories need to have the SetUID flag set to be used as a mount point.
D.Files within a directory are deleted when the directory is used as a mount point.
QUESTION 18
Which function key is used to start Safe Mode in Windows NT?
A.F10
B.F8
C.F6
D.Windows NT does not support Safe Mode
QUESTION 19
Which of the following environment variables overrides or extends the list of directories holding shared libraries?
A.LD_LOAD_PATH
B.LD_LIB_PATH
C.LD_LIBRARY_PATH
D.LD_SHARE_PATH
E.LD_RUN_PATH
QUESTION 20 : SIMULATION
Which world-writable directory should be placed on a separate partition in order to prevent users from being able to fill up the / filesystem? (Specify the full path to the directory.)
QUESTION 21
Which RPM command will output the name of the package which supplied the file /etc/exports?
A.rpm -F /etc/exports
B.rpm -qf /etc/exports
C.rpm -Kl /etc/exports
D.rpm -qp /etc/exports
E.rpm -qi /etc/exports
QUESTION 22 : SIMULATION
In which directory must definition files be placed to add additional repositories to yum?
QUESTION 23 : SIMULATION
What is the name of the main configuration file for GNU GRUB? (Specify the file name only without any path.)
QUESTION 24
When removing a package, which of the following dpkg options will completely remove the files including configuration files?
A.–clean
B.–delete
C.–purge
D.remove
QUESTION 25
Which file should be edited to select the network locations from which Debian installation package files are loaded?
A./etc/dpkg/dpkg.cfg
B./etc/apt/apt.conf
C./etc/apt/apt.conf.d
D./etc/apt/sources.list
E./etc/dpkg/dselect.cfg
QUESTION 26 : SIMULATION
Which option to the yum command will update the entire system? (Specify ONLY the option name without any additional parameters.)
QUESTION 27 : SIMULATION
Which command will disable paging and swapping on a device? (Specify ONLY the command without any path or parameters.)
QUESTION 28 : SIMULATION
Which Debian package management tool asks the configuration questions for a specific already installed package just as if the package were being installed for the first time? (Specify ONLY the command without any path or parameters.)
QUESTION 29
Which of the following commands overwrites the bootloader located on /dev/sda without overwriting the partition table or any data following it?
A.dd if=/dev/zero of=/dev/sda bs=512
B.dd if=/dev/zero of=/dev/sda bs=512 count=1
C.dd if=/dev/zero of=/dev/sda bs=440 count=1
D. dd if=/dev/zero of=/dev/sda bs=440
QUESTION 30
Which of the following commands can be used to create a USB storage media from a disk image?
A.gdisk
B.dd
C.cc
D.fdisk
E.mount
QUESTION 31
In Bash, inserting 1>&2 after a command redirects
A.standard error to standard input.
B.standard input to standard error.
C.standard output to standard error.
D.standard error to standard output.
E.standard output to standard input.
QUESTION 32
What command will generate a list of user names from /etc/passwd along with their login shell?
A.column -s : 1,7 /etc/passwd
B.chop -c 1,7 /etc/passwd
C.colrm 1,7 /etc/passwd
D.cut -d: -f1,7 /etc/passwd
QUESTION 33
In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories?
A.-dirmax
B.-maxdepth
C.-maxlevels
D.-n
E.-s
QUESTION 34
Which of the following statements is correct regarding the command foo 1> bar?
A.The stdout from the command foo is appended to the file bar.
B.The stdout from the command foo overwrites the file bar.
C.The command foo receives its stdin from the file bar.
D.The command foo receives its stdin from the stdout of the command bar.
E.The stderr from the command foo is saved to the file bar.
QUESTION 35
Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting?
A.kill -PIPE 123
B.kill -KILL 123
C.kill -STOP 123
D.kill -TERM 123
QUESTION 36 : SIMULATION
Which signal is missing from the following command that is commonly used to instruct a daemon to reinitialize itself, including reading configuration files?
killall -s _______ daemonanation
QUESTION 37
What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process?
A.9
B.19
C.49
D.99
QUESTION 38
Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the deleted content below the current line?
A.i (lowercase)
B.P (uppercase)
C.p (lowercase)
D.U (uppercase)
E.u (lowercase)
QUESTION 39
A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory?
A.rmdir ‘~/\dir’
B.rmdir "~/\dir"
C.rmdir ~/’dir’
D.rmdir ~/\dir
E.rmdir ~/\\dir
QUESTION 40
In compliance with the FHS, in which of the directories are man pages found?
A./usr/share/man
B./opt/man
C./usr/doc/
D./var/pkg/man
E./var/man
QUESTION 41
Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?
A.cat < myapp | cat > file1.log
B.myapp 0>&1 | cat > file1.log
C.myapp | cat > file1.log
D.myapp | tee file1.log
E.tee myapp file1.log
QUESTION 42
What is the purpose of the Bash built-in export command?
A.It allows disks to be mounted remotely.
B.It runs a command as a process in a subshell.
C.It makes the command history available to subshells.
D.It sets up environment variables for applications.
E.It shares NFS partitions for use by other systems on the network.
QUESTION 43
What is the output of the following command?
echo "Hello World" | tr -d aieou
A.Hello World
B.eoo
C.Hll Wrld
D.eoo Hll Wrld
QUESTION 44
Which of the following characters can be combined with a separator string in order to read from the current input source until the separator string, which is on a separate line and without any trailing spaces, is reached?
A.<<
B.<|
C.!<
D.&<
QUESTION 45
Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt?
A.file /tmp/myfile.txt
B.echo "Hello" >/tmp/myfile.txt
C.sed -ie "s/1/2/" /tmp/myfile.txt
D.echo -n "Hello" >>/tmp/myfile.txt
E.touch /tmp/myfile.txt
QUESTION 46
What is the default nice level when a process is started using the nice command?
A.-10
B.10
C.20
D.0
QUESTION 47
What is the default action of the split command on an input file?
A.It will break the file into new files of 1,024 byte pieces each.
B.It will break the file into new files of 1,000 line pieces each.
C.It will break the file into new files of 1,024 kilobyte pieces each.
D.It will break the file into new files that are no more than 5% of the size of the original file.
QUESTION 48
What is the difference between the i and a commands of the vi editor?
A. i (interactive) requires the user to explicitly switch between vi modes whereas a (automatic) switches modes automatically.
B.i (insert) inserts text before the current cursor position whereas a (append) inserts text after the cursor.
C.i (independent rows) starts every new line at the first character whereas a (aligned rows) keeps the indentation of the previous line.
D.i (interrupt) temporarily suspends editing of a file to the background whereas a (abort) terminates editing.
QUESTION 49 : SIMULATION
Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or parameters.)
QUESTION 50
Which of the following commands moves and resumes in the background the last stopped shell job?
A.run
B.bg
C.fg
D.back
QUESTION 51
What is the effect of the egrep command when the -v option is used?
A.It enables color to highlight matching parts.
B.It only outputs non-matching lines.
C.It shows the command’s version information.
D.It changes the output order showing the last matching line first.
QUESTION 52
What does the ? symbol within regular expressions represent?
A.Match the preceding qualifier one or more times.
B.Match the preceding qualifier zero or more times.
C.Match the preceding qualifier zero or one times.
D.Match a literal ? character.
QUESTION 53
In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows?
A. By using the command :repeat followed by the number and the command.
B.By specifying the number right in front of a command such as 4l or 2yj.
C.By selecting all affected lines using the shift and cursor keys before applying the command.
D.By issuing a command such as :set repetition=4 which repeats every subsequent command 4 times.
QUESTION 54
Which of the following files, located in the user home directory, is used to store the Bash history?
A. .bash_history
B. .bash_histfile
C. .history
D. .bashrc_history
E. .history_bash
QUESTION 55 :SIMULATION
Which Bash environment variable defines in which file the user history is stored when exiting a Bash process? (Specify ONLY the variable name.)
QUESTION 56
Which of the following commands displays the contents of a gzip compressed tar archive?
A.gzip archive.tgz | tar xvf –
B.tar ztf archive.tgz
C.gzip -d archive.tgz | tar tvf –
D.tar cf archive.tgz
QUESTION 57
Which grep command will print only the lines that do not end with a / in the file foo?
A.grep ‘/$’ foo
B.grep ‘/#’ foo
C.grep -v ‘/$’ foo
D.grep -v ‘/#’ foo
QUESTION 58
Which of the following commands is used to change options and positional parameters for a running Bash?
A.history
B.set
C.bashconf
D.setsh
E.envsetup
QUESTION 59
Which of the following commands replaces each occurrence of ‘bob’ in the file letter with ‘Bob’ and writes the result to the file newletter?
A.sed ‘/bob/Bob’ letter > newletter
B.sed s/bob/Bob/ letter < newletter
C.sed ‘s/bob/Bob’ letter > newletter
D.sed ‘s/bob/Bob/g’ letter > newletter
E.sed ‘s/bob, Bob/’ letter > newletter
QUESTION 60
From a Bash shell, which of the following commands directly executes the instruction from the file /usr/local/bin/runme.sh without starting a subshell? (Please select TWO answers.)
A. source /usr/local/bin/runme.sh
B. . /usr/local/bin/runme.sh
C./bin/bash /usr/local/bin/runme.sh
D./usr/local/bin/runme.sh
E.run /usr/local/bin/runme.sh
QUESTION 61
Regarding the command:
nice -5 /usr/bin/prog
Which of the following statements is correct?
A./usr/bin/prog is executed with a nice level of -5.
B./usr/bin/prog is executed with a nice level of 5.
C./usr/bin/prog is executed with a priority of -5.
D./usr/bin/prog is executed with a priority of 5.
QUESTION 62
Which shell command is used to continue background execution of a suspended command?
A.&
B.bg
C.cont
D.exec
E.:&
QUESTION 63
Which of the following shell redirections will write standard output and standard error output to a file named filename?
A.2>&1 >filename
B.>filename 2>&1
C.1>&2>filename
D.>>filename
E.1&2>filename
QUESTION 64
In the vi editor, which of the following commands will copy the current line into the vi buffer?
A.c
B.cc
C.1c
D.yy
E.1y
QUESTION 65
Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO correct answers.)
A.esc ZZ
B.ctrl :w!
C.esc zz
D.esc :wq!
E.ctrl XX
QUESTION 66
When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process?
A.-10
B.0
C.10
D.20
QUESTION 67
Which of the following commands will reduce all consecutive spaces down to a single space?
A.tr ‘\s’ ‘ ‘ < a.txt > b.txt
B.tr -c ‘ ‘ < a.txt > b.txt
C.tr -d ‘ ‘ < a.txt > b.txt
D.tr -r ‘ ‘ ‘\n’ < a.txt > b.txt
E.tr -s ‘ ‘ < a.txt > b.txt
QUESTION 68
Which character, added to the end of a command, runs that command in the background as a child process of the current shell?
A.!
B.+
C.&
D.%
E.#
QUESTION 69
Which of the following commands will print the last 10 lines of a text file to the standard output?
A.cat -n 10 filename
B.dump -n 10 filename
C.head -n 10 filename
D.tail -n 10 filename
QUESTION 70
Which of the following commands prints a list of usernames (first column) and their primary group (fourth column) from the /etc/passwd file?
A.fmt -f 1,4 /etc/passwd
B.split -c 1,4 /etc/passwd
C.cut -d : -f 1,4 /etc/passwd
D.paste -f 1,4 /etc/passwd
QUESTION 71
Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the keyboard?
A.SIGTERM
B.SIGINT
C.SIGSTOP
D.SIGKILL
QUESTION 72
What happens after issuing the command vi without any additional parameters?
A.vi starts and loads the last file used and moves the cursor to the position where vi was when it last exited.
B.vi starts and requires the user to explicitly either create a new or load an existing file.
C.vi exits with an error message as it cannot be invoked without a file name to operate on.
D.vi starts in command mode and opens a new empty file.
E.vi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains text.
QUESTION 73
Which of the following command sets the Bash variable named TEST with the content FOO?
A.set TEST="FOO"
B.TEST = "FOO"
C.var TEST="FOO"
D.TEST="FOO"
QUESTION 74
Which variable defines the directories in which a Bash shell searches for executable commands?
A.BASHEXEC
B.BASHRC
C.PATH
D.EXECPATH
E.PATHRC
QUESTION 75
Which of the following commands determines the type of a file by using a definition database file which contains information about all common file types?
A.magic
B.type
C.file
D.pmagic
E.hash
QUESTION 76 SIMULATION
Which command is used in a Linux environment to create a new directory? (Specify ONLY the command without any path or parameters.)
QUESTION 77
Which of the following commands prints all files and directories within the /tmp directory or its subdirectories which are also owned by the user root? (Choose TWO correct answers.)
A.find /tmp -uid root -print
B.find -path /tmp -uid root
C.find /tmp -user root -print
D.find /tmp -user root
E. find -path /tmp -user root print
QUESTION 78
When running the command
sed -e "s/a/b/" /tmp/file >/tmp/file
While /tmp/file contains data, why is /tmp/file empty afterwards?
A.The file order is incorrect. The destination file must be mentioned before the command to ensure redirection.
B.The command sed did not match anything in that file therefore the output is empty.
C.When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading.
D.Redirection for shell commands do not work using the > character. It only works using the | character instead.
QUESTION 79
When given the following command line. echo "foo bar" | tee bar | cat
Which of the following output is created?
A.cat
B.foo bar
C.tee bar
D.bar
E.foo
QUESTION 80
Which of the following commands can be used to determine how long the system has been running? (Choose TWO correct answers.)
A.uptime
B.up
C.top
D.uname -u
E.time up
QUESTION 81
Which of the following are valid stream redirection operators within Bash? (Choose THREE correct answers.)
A.<
B.<<<
C.>
D.>>>
E.%>
QUESTION 82
After successfully creating a hard link called bar to the ordinary file foo, foo is deleted from the filesystem. Which of the following describes the resulting situation?
A.foo and bar would both be removed.
B.foo would be removed while bar would remain accessible.
C.foo would be removed. bar would still exist but would be unusable.
D.Both foo and bar would remain accessible.
E.The user is prompted whether bar should be removed, too.
QUESTION 83
After moving data to a new filesystem, how can the former path of the data be kept intact in order to avoid reconfiguration of existing applications? (Choose TWO correct answers.)
A.By creating an ACL redirection from the old to the new path of the data.
B.By creating a hard link from the old to the new path of the data.
C.By creating a symbolic link from the old to the new path of the data.
D.By running the command touch on the old path.
E.By mounting the new filesystem on the original path of the data.
QUESTION 84
Which of the following commands changes the ownership of file.txt to the user dan and the group staff?
A.chown dan/staff file.txt
B.chown dan:staff file.txt
C.chown -u dan -g staff file.txt
D. chown dan -g staff file.txt
QUESTION 85
Which of the following commands makes /bin/foo executable by everyone but writable only by its owner?
A.chmod u=rwx,go=rx /bin/foo
B.chmod o+rwx,a+rx /bin/foo
C.chmod 577 /bin/foo
D.chmod 775 /bin/foo
QUESTION 86
Which of the following commands can be used to search for the executable file foo when it has been placed in a directory not included in $PATH?
A.apropos
B.which
C.find
D.query
E. whereis
QUESTION 87
What does the command mount -a do?
A.It ensures that all file systems listed with the option noauto in /etc/fstab are mounted.
B.It shows all mounted file systems that have been automatically mounted.
C.It opens an editor with root privileges and loads /etc/fstab for editing.
D.It ensures that all file systems listed with the option auto in /etc/fstab are mounted.
E.It ensures that all file systems listed in /etc/fstab are mounted regardless of their options.
QUESTION 88
Which of the following settings for umask ensures that new files have the default permissions -rw-r—– ?
A.0017
B.0640
C.0038
D.0027
QUESTION 89
Which of the following is the device file name for the second partition on the only SCSI drive?
A./dev/hda1
B./dev/sda2
C./dev/sd0a2
D./dev/sd1p2
QUESTION 90
In order to display all currently mounted filesystems, which of the following commands could be used? (Choose TWO correct answers.)
A.cat /proc/self/mounts
B.free
C.mount
D.lsmounts
E.cat /proc/filesystems
QUESTION 91
Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?
A.dirname
B.which
C.basename
D.query
E. whereis
QUESTION 92
Which of the following commands changes the number of days before the ext3 filesystem on /dev/sda1 has to run through a full filesystem check while booting?
A.tune2fs -d 200 /dev/sda1
B.tune2fs -c 200 /dev/sda1
C.tune2fs -i 200 /dev/sda1
D.tune2fs -n 200 /dev/sda1
E.tune2fs –days 200 /dev/sda1
QUESTION 93
Which type of filesystem is created by mkfs when it is executed with the block device name only and without any additional parameters?
A.ext2
B.ext3
C.ext4
D.XFS
E.VFAT
QUESTION 94
How many fields are in a syntactically correct line of /etc/fstab?
A.3
B.4
C.5
D.6
E.7
QUESTION 95 SIMULATION
Which command is used to create and initialize the files used to store quota information? (Specify ONLY the command without any path or parameters.)
QUESTION 96
Which of the following file permissions belong to a symbolic link?
A.-rwxrwxrwx
B.+rwxrwxrwx
C.lrwxrwxrwx
D.srwxrwxrwx
QUESTION 97
Creating a hard link to an ordinary file returns an error. What could be the reason for this?
A.The source file is hidden.
B.The source file is read-only.
C.The source file is a shell script.
D.The source file is already a hard link.
E.The source and the target are on different filesystems.
QUESTION 98
Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct answers.)
A./sbin/mke2fs -j /dev/sdb1
B./sbin/mkfs -t ext3 /dev/sdb1
C./sbin/mkfs -c ext3 /dev/sdb1
D./sbin/mke3fs -j /dev/sdb1
QUESTION 99
Which of the following commands will change the quota for a specific user?
A. edquota
B.repquota
C.quota -e
D.quota
QUESTION 100
Which utility would be used to change how often a filesystem check is performed on an ext2 filesystem without losing any data stored on that filesystem?
A.mod2fs
B.fsck
C.tune2fs
D.mke2fs
E.fixe2fs
QUESTION 101
Which of the following Linux filesystems preallocates a fixed number of inodes at the filesystem’s make/creation time and does NOT generate them as needed? (Choose TWO correct answers.)
A.ext3
B.JFS
C.ext2
D.XFS
E.procfs
QUESTION 102
What is the purpose of the Filesystem Hierarchy Standard?
A.It is a security model used to ensure files are organized according to their permissions and accessibility.
B.It provides unified tools to create, maintain and manage multiple filesystems in a common way.
C.It defines a common internal structure of inodes for all compliant filesystems.
D.It is a distribution neutral description of locations of files and directories.
QUESTION 103
Which of the following commands lists the dependencies of a given dpkg package?
A. apt-cache depends-on package
B. apt-cache dependencies package
C. apt-cache depends package
D. apt-cache requires package
QUESTION 104
Which of the following options is used in a GRUB Legacy configuration file to define the amount of time that
the GRUB menu will be shown to the user?
A. hidemenu
B. splash
C. timeout
D. showmenu
QUESTION 105
What can the Logical Volume Manager (LVM) be used for? (Choose THREE correct answers.)
A. To create RAID 9 arrays.
B. To dynamically change the size of logical volumes.
C. To encrypt logical volumes.
D. To create snapshots.
E. To dynamically create or delete logical volumes.
QUESTION 106
Which of the following commands updates the linker cache of shared libraries?
A. mkcache
B. soconfig
C. mkldconfig
D. lddconfig
E. ldconfig
QUESTION 107
Which of the following commands lists all currently installed packages when using RPM package
management?
A. yum –query –all
B. yum –list –installed
C. rpm –query –all
D. rpm –list installed
QUESTION 108 :SIMULATION
Which umask value will result in the default access permissions of 600 (rw——-) for files and 700 (rwx——)
for directories? (Specify only the numerical umask value.)
QUESTION 109
What of the following statements are true regarding /dev/ when using udev? (TWO correct answers.)
- Entries for all possible devices get created on boot even if those devices are not connected.
- Additional rules for udev can be created by adding them to /etc/udev/rules.d/.
- When using udev, it is not possible to create block or character devices in /dev/ using mknod.
- The /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup.
- The content of /dev/ is stored in /etc/udev/dev and is restored during system startup.
QUESTION 110
What is the difference between the i and a commands of the vi editor?
- i (interactive) requires the user to explicitly switch between vi modes whereas a (automatic) switchesmodes automatically.
- i (insert) inserts text before the current cursor position whereas a (append) inserts text after the cursor.
- i (independent rows) starts every new line at the first character whereas a (aligned rows) keeps the indentation of the previous line.
D. i (interrupt) temporarily suspends editing of a file to the background whereas a (abort) terminates editing.
QUESTION 111
Which of the following commands set the sticky bit for the directory /tmp? (Choose TWO correct answers.)
- chmod +s /tmp
- chmod +t /tmp
- chmod 1775 /tmp
- chmod 4775 /tmp
- chmod 2775 /tmp
QUESTION 112
Which of the following commands shows the definition of a given shell command?
- where
- stat
- type
- case
QUESTION 113
What do the permissions -rwSr-xr-x mean for a binary file when it is executed as a command?
- The command is SetUID and it will be executed with the effective rights of the owner.
- The command will be executed with the effective rights of the group instead of the owner.
- The execute flag is not set for the owner. Therefore the SetUID flag is ignored.
- The command will be executed with the effective rights of the owner and group.
- QUESTION 114
- Which of the following pieces of information of an existing file is changed when a hard link pointing to that file is created?
- File size
- Modify timestamp
- Link count
- Inode number
- Permissions
QUESTION 115
During a system boot cycle, what program is executed after the BIOS completes its tasks?
- The bootloader
- The inetd program
- The init program
- The kernel
QUESTION 116
You have an updated RPM called screensaver-1.1.i386. rpm. You have version 1.0 installed.
Using RPM, how do you view the changelog of this file to see if you should install the update?
- rpm -qp –changelog screensaver-1.1.i386. rpm
- rpm –changelog screensaver-1.1.i386. rpm
- rpm -qc screensaver-1.1.i386. rpm
- rpm -showchangelog screensaver-1.1.i386. rpm
QUESTION 117
You are installing Linux on a workstation for a new employee. Which partition should be largest?
A. /
B. /boot
- /lib
- /usr
QUESTION 118
Which command will allow you to find a specific installed package?
- rpm — list rpmname
- rpm -qvl rpmname
- rpm rpmname
- rpm -qv rpmname
- rpm -f rpmname
QUESTION 119
You are building a server that will undergo many hardware and operating system upgrades. The server is the file server for all users on your 100 user network. Which directory should have its own mountpoint and/ or hard drive?
- /boot
- /sbin
- /home
- /etc
QUESTION 120
What file is read by the program ldconfig?
- /lib/ld.so
- /etc/ld.so.conf
- /etc/ld.so.cache
- /etc/modules.conf
QUESTION 121
You installed a beta rpm package, but are experiencing some problems with it. How can you remove this package?
- rpm -qe rpmname
- rpm -V –remove rpmname
- rpm -r rpmname
- rpm -d rpmname
- rpm -ev rpmname
QUESTION 122
As root you have navigated to directory /B. You wish to move all of the files and directories from directory / A to directory /B. Which of the following options would be the most appropriate command line to execute this task?
- cp /a/* .
- mv -f /A/* .
- mv -Rf /a/* .
- cp -f /a/* ..
- cp -rf /A/* /b/
QUESTION 123
What key sequence will suspend the current process and return you to a shell prompt?
A. Ctrl-z
B. Ctrl-c
- Ctrl-x
- Ctrl-d
QUESTION 124
You want to save vi changes to the file myfile with :w!, but vi complains it can not write to the file.
Therefore, you want to check the write permissions on the file. To do this without leaving vi, you type:
- :!ls -l myfile
- :\ls -l myfile
- esc :ls -l myfile
- :?ls -l myfile
QUESTION 125
Which of the following GNU commands would be the most likely command you’d use to find the system load average?
- top
- nice
- loadavg
- cpustat
- ps
QUESTION 126
What is the disadvantage of using the command kill -9 ?
- A core dump file will be created.
- It affects the entire process group.
- It makes excessive use of system resources.
- The action can be blocked by buggy or malicious processes.
- The affected process is unable to clean up before exiting.
QUESTION 127
To prevent a command run as root from sending both standard out (stdout) and standard error (stderr) to any terminal or other file or device, which of the following strings should be appended to the command?
- >/dev/null
- >/dev/null 1>&2
- >/dev/null 2>&1
- 1>&2 >/dev/null
- 2>&1 >/dev/null
QUESTION 128
You want to the command foo to take its input from the file foobar and send its output to the program bar. Which of the following command lines will do this?
- foo < foobar | bar
- foo < foobar > bar
- foo | foobar > bar
- foo | bar < foobar
- foo > bar < foobar
QUESTION 129
Which of the following commands would display the lines containing capital letters form the file "turkey.txt"?
- cat turkey.txt|wc -|
- grep -n [A-Z] turkey.txt
- cat turkey.txt|wc -w [A-Z]
- grep -v [A-Z] < turkey.txt
- for [A-Z] in turkey.txt | count
QUESTION 130
What umask will set the file permissions on a newly created file to -rw-r–r– (644)?
A. 0002
B. 0022
C. 0224
D. 0246
QUESTION 131
What TWO permissions must a user have in order to run a shell script?
- read
- write
- execute
- browse on the directory
- users cannot run shell scripts
QUESTION 132
You have just added a CD-ROM drive (/dev/hdd) to your system and have added it to your fstab. Typically you can use which of the following commands to mount media in that drive to /mnt/cdrom?
- mount /dev/cdrom /mnt/cdrom
- mount /dev/cdrom
- mount -t cdrom/dev/cdrom /mnt/cdrom
- mount /mnt/cdrom
- automount /mnt/hdd /mnt/cdrom
QUESTION 133
In order to append the output of ls to a file called bazz, which of the following command lines would you use?
- ls > bazz
- ls >& bazz
- C. ls &> bazz
D. ls >> bazz
QUESTION 134
You need to create a simple hierarchy of directories: images/photos/summer/ottawa/. None of the directories on that path exists. What command will create all of the needed directories in one step?
- mkdir -r images/photos/summer/ottawa/
- mkdir -R images/photos/summer/ottawa/
- mkdir -p images/photos/summer/ottawa/
- mkdir -P images/photos/summer/ottawa/
- mkdir -m images/photos/summer/ottawa/
QUESTION 135
While using the vi editor, you wish to move ahead one page. You should press the control key and:
- A
- D
- F
- U
QUESTION 136 (AMBIGUOUS)
The command mkfs -t ext3 /dev/hdb1 -T largefile creates what size of inode?
- 4 kilobyte
- 1 megabyte
- 2 megabyte
- 4 megabyte
QUESTION 137
What is a reasonable command to uninstall a Debian package from your system?
- dpkg -Ra pkgname
- dpkg -R pkgname
- dpkg -r pkgname
- dpkg -ra pkgname
QUESTION 138
You want to install a new software package, but it is only available in RPM format and you are running Debian Linux. Which of the following would help you to install it on your system?
- alien
- apt-conf
- dselect
- cpio
QUESTION 139
You want to examine the changelog for the installed package postfix. Which command will display the changelog?
- rpm -Vc postfix
- rpm -qpil postfix
- rpm –changelog postfix
- rpm -q –changelog postfix
- rpm -qa –changelog postfix
QUESTION 140
You have finished updating and resolving dependencies for some source code. What command should you run before recompiling the code into binary form?
- make clean
- make all
- makedep
- make install
QUESTION 141
An installed package is broken. In order to go back to the previous version of the same package which RPM option should be used?
- –replacefiles
- –replacepkgs
- –oldpackage
- –nodeps
QUESTION 142
According to the File System Hierarchy Standard, the lost+found directory is used for:
- files with unknown owners
- missing device files found by/proc
- unknown binary files found by find
- unlinked files found by fsck
QUESTION 143
Which of the following commands will display the last 30 lines of /var/log/bigd.log as well as new content as it is appended to the file by another process?
- cut -30 -v /var/log/bigd.log
- head -30 -e /var/log/bigd.log
- tail -f -n 30 /var/log/bigd.log
- tac -30 /var/log/bigd.log
- cat -r -n 30 /var/log/bigd.log
QUESTION 144
Which of the following commands will find the string foo in the file filel.txt, regardless of foo being in upper or lowercase letters?
- cat file1.txt | grep -i foo
- cat file1.txt > grep -n foo
- grep -i foo | file1.txt
- grep -n file1.txt < foo
- grep -n foo file1.txt
QUESTION 145
Keyboards and mice are members of which class of USB devices?
- Communication Device Class
- Human Interface Device Class
- Mass Storage Device Class
- Data Interface Device Class
QUESTION 146
The command echo $! will produce what output?
- the process id of last background command
- the exit status of the last command
- the exit status of the last background command
- the process id of the current shell
- the name of the command being executed
QUESTION 147
Which of the following commands will change all CR-LF pairs in an imported text file, userlist.txt, to Linux standard LF characters and store it as newlist.txt?
- tr ‘\r\n’ ” < userlist.txt > newlist.txt
- tr -c ‘\n\r’ ” < newlist.txt > userlist.txt
- tr -d ‘\r’ < userlist.txt > newlist.txt
- tr ‘\r’ ‘\n’ userlist.txt newlist.txt
- tr -s ‘^M’ ‘^J’ userlist.txt newlist.txt
QUESTION 148
What command will print a list of usernames (first column) and their corresponding user id (uid, third column) from /etc/passwd?
- cut -d: -f1,3 /etc/passwd
- chop -c 1,3 /etc/passwd
- tac 1-3 /etc/passwd
- fmt -u /etc/passwd
QUESTION 149
Which of the following commands can be used to create a new file that is 100kB in size?
- dd
- file
- mkfile
- touch
QUESTION 150
When piping the output of find to the xargs command, what option to find is useful if the filenames have spaces in them?
- -rep-space
- -print0
- -nospace
- -ignore-space
QUESTION 151
Which option to the tee command will cause the output to be concatenated on the end of the output file instead of overwriting the existing file contents?
- -a
- -c
- –no-clobber
- continue
QUESTION 152
Consider the following commands
- $ nice -n 1 /usr/bin/somecommand
- $ nice -n 5 /usr/bin/somecommand
- $ nice -n 10 /usr/bin/somecommand
Which instance of somecommand is run with the highest priority?
- A
- B
- C
- none, only superuser can change the priority
QUESTION 153
Which of the following commands makes /bin/foo executable by everyone but only writable by its owner?
- chmod 557 /bin/foo
- chmod o +rwx,a+rx /bin/foo
- chown 557 /bin/foo
- chmod 755 /bin/foo
QUESTION 154
Which command would run "make" in the background?
- make && bg
- make ; bg
- make &
- nohup make
QUESTION 155
Which of the following is very important when installing from source code? (select two)
A. Read all documentation included with the source code.
B. Reboot after installing all programs.
C. Manually check to see if all dependencies are met.
D. Use rpm or dpkg go verify the installation.
E. Do not install binaries as the root user.
QUESTION 156
John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. He wants to change the modified date and time of the file private.txt to 11 Nov 2009 02:59:58 am. Which of the following commands will John use to accomplish his task? Each correct answer represents a complete solution. Choose TWO answers.
- touch -d "11 Nov 2009 02:59:58 am" private.txt
- touch -t 200911110259.58 private.txt
- rm private.txt #11 Nov 2009 02:59:58 am
- touch private.txt #11 Nov 2009 02:59:58 am
- QUESTION 157
John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. He stores his passwords in the password.txt file. He stores them in such a manner that in the password file, each word is separated with a delimiter colon (:) and the fifth word to the end of the line becomes the password of the user. If there is any colon from the fifth word to the end of the line, the colon will be used as the password. For example, a sample of a password.txt file is given below:
foo:bar:baz:qux:quuux one:two:three:four:five:six:seven alpha:beta:gamma:delta:epsilon:zeta:eta:teta
In the above example, the sample passwords will be as follows: quuux
#From the first line five:six:seven
#From the second line epsilon:zeta:eta:teta #From the third line
John wants to store the passwords from the password.txt file and send them to the management of Perfect
Solutions Inc. For this, he has to fetch the passwords from the password.txt file and store them into the Password_management.txt file using a Linux command. Which of the following commands can he use to accomplish this?
- cat password.txt > password_management.txt
- cut -d : -f 5- password.txt > password_management.txt
- cut -c 4-10 password.txt > password_management.txt
- sed -e ‘/^ *$/d’ password.txt > password_management.txt
QUESTION 158
John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. He has recently backed up his entire Linux hard drive into the my_backup.tgz file. The size of the my_backup.tgz file is 800MB. Now, he wants to break this file into two files in which the size of the first file named my_backup.tgz.aa should be 600MB and that of the second file named my_backup.tgz.ab should be 200MB. Which of the following commands will John use to accomplish his task?
- split –verbose -b 200m my_backup.tgz my_backup.tgz
- split –verbose -b 200m my_backup.tgz my_backup.tgz
- split –verbose -b 600m my_backup.tgz my_backup.tgzaa
- split –verbose -b 600m my_backup.tgz my_backup.tgz
QUESTION 159
John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. He is working as a root user on the Linux operating system. He is installing a new Debian package named my_package.deb. However, he wants to ensure that while upgrading my_package.deb, one of the parts of my_package.deb named fglrx-driver does not upgrade. Which of the following actions can he perform to accomplish his task?
Each correct answer represents a complete solution. Choose all that apply.(2)
- Edit the /etc/apt/preferences file and write the following lines:
Package: fglrx-driver Pin: version 8.43.2-2
Pin-Priority: 1001
- Execute the following command: echo "fglrx-driver hold" | dpkg –set-selections
- Execute the following command: dpkg -S fglrx-driver
- Execute the following command: dpkg -s fglrx-driver
QUESTION 160
John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. John is using a dual-CPU system with an Adaptec dual-AIC7895 SCSI controller. He wants to add new hardware to the existing Linux operating system. However, before doing so, he wants to verify which resources are being used by the existing devices so that he can check whether adding any new hardware can be a cause of a hardware/software conflict or not. Which of the following commands can John use to accomplish his task?
- cat /proc/interrupts
- cat /proc/partitions
- mount | column -t
- mount -t smbfs -o fmask=666,guest //windows_box/share /mnt/share
QUESTION 161
You want to verify the PGP signature of all headers and signatures associated with an RPM package.
Which of the following commands will you use to accomplish the task?
Each correct answer represents a complete solution. Choose all that apply.
- rpm -K
- rpm –checksig
- rpm -e
- rpm -V
QUESTION 162
John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network. He is working as a root user on the Linux operating system. He wants to remove a debian packet foobar from his computer and have it maintained so that whenever he wants to install it from the stored files, he can do so. Which of the following commands can John use to accomplish his task? Each correct answer represents a complete solution. Choose all that apply.
- dpkg –clear-avail
- dpkg –remove
- dpkg -r
- dpkg –purge
QUESTION 163
John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based network.
John is working as a root user on the Linux operating system. You want to run two programs, foo and bar. You also want to ensure that bar is executed if and only if foo has executed successfully. Which of the following command sequences will John use to accomplish the task?
- foo; bar;
- foo && bar;
- foo || bar;
- foo | bar;
QUESTION 164
Yesterday, you installed Samba from source. After reading all documentation on http://www.samba.org you now want to configure some network shares. Unfortunately, you can’t find samba’s configuration file smb.conf anywhere. Which of the following commands have the best chance of success to find your smb.conf file ? (choose the best 2 answers)
- find / -name smb.conf
- whereis smb.conf
- which smb.conf
- updatedb; locate smb.conf
QUESTION 165
Some rogue process has created thousands of files with extension .foo in /tmp, filling up the entire filesystem. After you kill the process and remove the homedirectory of the user who started this process you want to clean up /tmp. But you get the following error:
rm: argument list too long
Which of the following commands will allow you to remove all *.foo files in /tmp ? (choose the best answer)
- rm `ls | grep ‘.foo$’`
- ls *.foo | xargs rm
- ls | grep ‘.foo$’ | xargs rm
- xargs rm `ls | grep ‘.foo$’`
QUESTION 166
While running a program to compute the Biggest Prime Known To Men you discover that your system is getting a bit unresponsive. Running ‘top’ gives you the following information:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9519 test 15 0 236 236 192 R 98.4 83.5 1228:55 primefind
Since the program has allready been running a long time and you’re sure it will spit out the answer soon, you don’t want to kill it. What other option do you have ? (choose the best answer)
- nice +10 -p 9519
- nice -10 -p 9519
- renice +10 -p 9519
- renice -10 -p 9519
QUESTION 167
You’re processing a file ‘allmostempty.txt’ with lots of empty lines. You want to get rid of these empty lines as they are totally useless for your purpose. Which command would you use? (choose the best answer)
- grep -v ‘^$’ < allmostempty.txt
- sed ‘s/^$//’ < allmostempty.txt
- grep ‘.+’ < allmostempty.txt
- sed -e ‘.+’ < allmostempty.txt
QUESTION 168
In Linux (and Unix in general) there’s often more than one way to get a job done. Which of the following command sequences is NOT a common way to leave the vi editor? (choose the best answer)
A. 😡
B. :q!
- ZZ
- :qw!
QUESTION 169
Which of the following commands will give you the amount of diskspace used on the root filesystem in kilobytes ? (choose the best 2 answers)
- du -k /
- df -skx /
- df -k /
- du -skx /
QUESTION 170 SIMULATION
What command would you use to transform an existing ext2 filesystem into a journalled (ext3) filesystem without losing data? (Give only the command, without the path or any parameters) __________________.
QUESTION 171
You administer a system with quota enabled. The powers that be have asked you to add a new user sam. Sam should have the same amount of diskspace available as his colleague Mose. What command would you use? (choose the best answer)
- repquota -a sam -p mose
- edquota -p mose sam
- quotaon sam -p mose
D. quotactl -n sam -p mose
QUESTION 172
Which command would you put in your ~/.profile to ensure that all new files you create are readable by people who are in the same group while anybody else has no access at all? (choose the best answer)
A. umask 640
B. ulimit 750
- umask 027
- ulimit 640
QUESTION 173
You want all users in the group ‘operators’ to be able to mount and unmount filesystems and nobody else.
Which commands would accomplish that? (choose the best 2 answers)
- chgrp operators /sbin/*mount; chmod 1750 /sbin/*mount
- chgrp operators /sbin/*mount; chmod u+s,o-rwx /sbin/*mount
- chgrp operators /sbin/*mount; chmod g+s,o-rwx /sbin/*mount
D. chgrp operators /sbin/*mount; chmod 4750 /sbin/*mount
QUESTION 174 SIMULATION
You desperately need a program on your Debian box, but all you can find on google is an rpm package for RedHat. What command will allow you to (try to )install this rpm package anyway? (Give the command without the path or any options)
QUESTION 175
What is the purpose of the & character at the end of a command line?
- It causes standard error to be unbuffered.
- It causes the command to be run in the background of the current shell.
- It puts the command under the job control facilities of the current shell.
- It causes the command to be run as a child of the initial login shell of the user.
QUESTION 176
Which of the following commands will produce the following output?
- jobs
- proclist
- netstat
- ps
QUESTION 177
What does the ? symbol mean in the following grep regular expression:grep ‘^d[aei]\?d$’ /usr/share/dict/ words
- Match the preceding character set ([aei]) one or more times.
- Match the preceding character set ([aei]) zero or more times.
- Match the preceding character set ([aei]) zero or one times.
- Match a literal ?symbol.
QUESTION 178
Which signal is sent to a suspended process in order to have it resume execution?
- CONT
- EXEC
- RESM
- UNSP
QUESTION 179
Which vi command will change modes so that text can be entered by typing in the keyboard?
- e
- i
- t
- w
QUESTION 180
What is the purpose of the xargs command?
- It passes argument to an X server.
- It will read standard input and build up commands lines to execute.
- It helps shell scripts take variable argument lists.
- It will ask a question, graphically, and return the answer to the shell.
- It will allow users to specify long options for commands that normally only accept short options.
QUESTION 181
Once a shell variable has been created, how can the variable be removed from the environment?
- VAR=
- set -d VAR
- set -u VAR
D. unset VAR
QUESTION 182
Which of the following is a limitation of the cut command?
- The cut command can only select output by field position.
- The cut command cannot reorder fields.
- The cut command only works on ASCII text.
- The cut command will always print one line of output for every line of input.
QUESTION 183
Which of the following commands will print the first few lines of a text file to the shell?
A. cat -n 10 filename
B. dump -n 10 filename
- head -n 10 filename
- print -n 10 filename
QUESTION 184
Which command will convert all tab characters in a file to spaces and print that to standard out?
A. convert
B. expand
- retab
- untab
QUESTION 185
In order to use the output of ls to overwrite a file called bazz, which of the following command lines would you use?
- ls>bazz
- ls>&bazz
- ls&>bazz
D. ls>>bazz
QUESTION 186
In bash, inserting 2>&1 after a command redirects
- standard error to standard input.
- standard input to standard error.
- standard output to standard error.
- standard error to standard output.
- standard output to standard input.
QUESTION 187
Which signal is sent by the kill command by default?
- HUP(1)
- QUIT(3)
- KILL(9)
- TERM(15)
QUESTION 188