Questions for Linux
Total Page:16
File Type:pdf, Size:1020Kb
www.YoYoBrain.com - Accelerators for Memory and Learning Questions for Linux Category: Default - (154 questions) Linux: 3 packages needed to build a kernel compiler linker make utility Linux: to build the kernel the ____ compiler GCC C compiler must be used Linux: when compiling a kernel the gcc binutils compiler needs an additional set of tools ____ to do linking and assembling of source files Linux: how to determine the version of ld -v binutils the system has Linux: Grub Linux command line to modprobe.blacklist=radeon black list a module driver Linux: utility to create a "Makefile"-like depmod dependency file, that gets used by modprobe to automatically load the current modules Linux: program that enables Linux to provide udev a persistent device naming system in the /dev directory Linux: query device information from the udevinfo udev database replaced by: udevadmin info Linux: PCMCIA a standard specification for memory cards and interfaces in personal computers Linux: how does Linux kernel designate the kernel name includes -rc in name for development kernels versus stable kernel development Linux: what/where is the kernel configuration .config file in the top of directory of the kernel kept source tree Linux: most basic method of configuring a make config kernel this will step through every config option Linux: how to bring an old kernel .config up make oldconfig to date on newer kernel Linux: how to make kernel config changes on make menuconfig existing .config file Linux: how to build linux-image and make -j2 deb-pkg LOCALVERSION=-custom linux-header .deb files from linux kernel source Linux: to build kernel on multiprocessor what -jn switch is needed with n being a number = 2x the number of processors on the system Linux: how to specify location of output file use capital O switch when building Linux kernel O=location Linux: argument to specify a different ARCH= architecture for kernel build system Linux: argument to specify the specific CC= compiler to use for kernel build Linux: how to specify a cross compile CROSS_COMPILE= toolchain with kernel build Linux: ccache a software development tool that caches the output of C/C++ compilation so that the next time the same compilation can be avoided and results taken from the cache Linux: how to install modules built during make modules_install kernel build Linux: how to manually let GRUB know that a modify the /boot/grub/menu.lst file new kernel is present Linux: how to apply a patch file to kernel patch -pl < ../patch_file Linux: LiveCD a completely bootable computer installation which runs directly from a CD-ROM Linux: sysfs a pseudo file system provided by the Linux kernel that exports info about various kernel subsystems, hardware devices, and associated device drivers from kernel's device model to user space using virtual files Linux: where is sysfs mounted /sys Linux: ifconfig Linux utility for network interface configuration Linux: utility to strip all prefix up to the last / basename in a patchname Linux: utility to translate a symbolic link to the readlink real path Linux: where can you find the PCI bus ID of returned in the lspci command device Linux: if you have PCI bus ID from lspci, how cd to /sys/bus/pci/devices to find the vendor and device IDs find directory with Bus ID from lspci and cd into cat vendor cat device Linux: how to find bus ID for USB devices lsusb Linux: get a list of all resource limits ulimit -a Linux: what file contains all the soft and hard /ect/security/limits.conf limits Linux: set a specific hard limit for one ulimit -H [option] [number] variable Linux: set a specific soft limit for one variable ulimit -S [option] [number] Linux: PCI Peripheral Component Interconnect - standard that describes how to connect the peripheral components of a system together in a structured and controlled way Linux: access by PCI devices into the DMA (Direct Memory Access) Channels system's memory is controlled using Linux: PCI has 3 memory address spaces: PCI I/O ____, _____, and _____ PCI Memory PCI Configuration Space Linux: how to get the PCI bus configuration cat /proc/pci Linux: what is GRUB command line option disables the Advanced Configuration and acpi=off Power Interface off temporarily while booting Ubuntu Linux: what does the GRUB command line turns off MSI - message signaled option pci=nomis do? interrupts. MSI enables a device to generate an interrupt using an inbound Memory Write on its PCI bus instead of asserting a device IRQ pin Linux: difference between soft and hard limit hard limit - the maximum allowed to user, set for ulimit by root. It is the value in /etc/security/limits.conf soft limit - the effective value right now for a user. User can increase their own soft limit but not above the hard limit Linux: syntax for setting limits in limits.conf sbob - is user name file for user versus group @managers - group name (prefaced with @) Linux: what is max locked memory memory that is locked and may not be paged out, made unswappable with mlock Linux: ulimit versus setrlimit setrlimit is the underlying system call that ulimit wraps Linux: ACPI a standard that allows the BIOS of the computer to work with the operating system in order to access the hardware in an indirect manner, to simplify programs to the hardware Linux: context switch the act of one process giving up control of the CPU to another process Linux: MMU memory management unit - enables a memory access scheme called virtual memory Linux: fork() vs exec() fork - kernel creates a nearly identical copy of a process exec - kernel starts a program, replacing the current process Linux: pseudodevices look like devices to user processes, but implemented purely in software Linux: path to kernel random number /dev/random generator device Linux: switch to invert grep match (find grep -v everything but text) Linux: when using less how to go back a b key screenful Linux: difference between environment and the operating system passes all of the shell's shell variables environment variables to any program the shell runs, whereas shell variables can't be accessed in commands the shell runs Linux: how to assign a shell variable to export varName environment variable Linux: vi - move cursor left Ctrl-b Linux: vi - move cursor right Ctrl-f Linux: vi - move cursor up one line Ctrl-p Linux: vi - move cursor down one line Ctrl-n Linux: vi - move cursor to the beginning of Ctrl-a the line Linux: vi - move cursor to the end of the line Ctrl-e Linux: vi - paste erased text Ctrl-y Linux: erase the preceding word Ctrl-w Linux: vi - erase from the cursor to the Ctrl-u beginning of line Linux: vi - erase from the cursor to the end of Ctrl-k the line Linux: to search for a manual page by -k option keyword man -k keyword Linux: what is man section 1 user commands Linux: what is man section 2 system calls Linux: what is man section 3 higher level Unix programming library documentation Linux: what man section 4 device interface and driver information Linux: what is man section 5 file descriptions (system config files) Linux: what is man section 8 system commands and servers Linux: how to pull a specific man section insert section number before the page name when looking up keyword passwd man 5 passwd Linux: segmentation fault when a program tries to access a part of memory it was not allowed to touch Linux: bus error when a program tries to access some memory in a particular way that it shouldn't Linux: show all of your running processes ps x Linux: show process with more detailed info ps u on process Linux: show process with full command line ps w Linux: freeze a process instead of kill -STOP pid terminating it using PID number Linux: how to restart a suspended process kill -CONT pid using PID number Linux: where are kernel bootloader files /boot Linux: the kernel is normally in ____ or ____ /vmlinuz /boot/vmlinuz Linux: location of loadable kernel modules /lib/modules Linux: the ___ system enables user-space udev programs to automatically configure and use new devices Linux: another name for device files device nodes Linux: when using ls what does file mode of block device b mean Linux: block device storage devices that programs can access data from in fixed chunks Linux: when using ls what does file mode of character device c mean Linux: character device works with data streams - you can only read characters from or write characters to character devices Linux: named pipe like a character device, with another process at the other end of the I/O stream instead of kernel driver Linux: socket device special purpose interfaces that are frequently used for interprocess communication Linux: when using ls, what does file mode of named pipe p mean Linux: when using ls, what does the file socket device mode of s mean Linux: how to find the path and other udevadmin info --query=all attributes of /dev/sda --name=/dev/sda Linux: list all the SCSI devices lsscsi Linux: Linux recognizes most optical storage /dev/sr0, /dev/sr1, .... drives as the SCSI devices _____ Linux: what are device names for printers /dev/lp0, /dev/lp1, .... Linux: device names for bidirectional parallel /dev/parport0, /dev/parport1, ... ports Linux: 2 sets of audio devices 1. Advanced Linux Sound Architecture (ALSA) 2. Open Sound System (OSS) Linux: ______ filesystem was developed in devtmpfs response to the problem of device availability during boot Linux: udevd daemon operates as follows 1.