www.YoYoBrain.com - Accelerators for Memory and Learning Questions for

Category: Default - (154 questions) Linux: 3 packages needed to build a kernel compiler linker make utility Linux: to build the kernel the ____ compiler GCC 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 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 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 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: a pseudo provided by the Linux kernel that exports info about various kernel subsystems, hardware devices, and associated device drivers from kernel's device model to 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 Linux: what does the GRUB command line turns off MSI - message signaled option pci=nomis do? .  MSI enables a device to generate an  using an inbound Memory 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 that ulimit wraps Linux: ACPI a standard that allows the BIOS of the computer to work with the in order to access the hardware in an indirect manner, to simplify programs to the hardware Linux: the act of one giving up control of the CPU to another process Linux: MMU unit - enables a memory access scheme called 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 '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 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: when a program tries to access a part of memory it was not allowed to touch Linux: 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 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. Sound System (OSS) Linux: ______filesystem was developed in devtmpfs response to the problem of device availability during boot Linux: udevd operates as follows 1. kernel sends udevd a notification event, called uevent 2. udev loads all of the attributes in uevent 3. udevd parses its rules and takes action Linux: where are the udev rule files /lib/udev/rules.d /etc/udev/rules.d Linux: how to see all the udevadmin info --query=all --name=/dev/sda udev attributes used and generated for device /dev/sda Linux: to see only kernel messages udevadmin monitor --kernel pertaining to the SCSI interface subsystem --subsystem-match=scsi Linux: partitions are defined on a small area partition table of the disk called ___ Linux: to force the kernel to reload the blockdev --rereadpt /dev/sdf partition table on /dev/sdf Linux: LBA - Logical Block Adressing used by disk hardware to simplify addressing a location of the disk by block number Linux: bootloader does 2 things 1. loads kernel into memory 2. starts kernel with a set of kernel parameters Linux: one of the most significant partition alignment - do the partition and its factors affecting the performance of SSD data lie on a 4096-byte boundary Linux: ISO 9660 CD-ROM standard Linux: how to create an ext4 partition mkfs -t ext4 /dev/sdf2 on /dev/sdf2 Linux: superblock a key component at the top level of filesystem database, several backups are created when running mkfs Linux: mkfs is only a frontend for a series of filesystem creation programs, mkfs.fs where fs is filesystem type mkfs -t ext4 runs mksf.ext4 Linux: command to force the kernel to write changes in its buffer to the disk Linux: the tool to check filesystem fsck Linux: how to check a filesystem without fsck -n modifying anything Linux: how to replace a corrupt fsck -b num filesystem's superblock where num is superblock backup Linux: how to view a list of superblock mkfs -n backups Linux: to flush the journal in an ext3 or ext4 e2fsck -fy /dev/disk_device filesystem to the regular filesystem database Linux: tool that allows you to look through the files on a filesystem and copy them elsewhere if filesystem is corrupt Linux: to remove a swap partition or file from swapoff the kernel's active pool Linux: to view the numbers for any ls -i directory Linux: to view the kernel parameters from cat /proc/cmdline system's boot Linux: nearly all disk hardware has firmware Linear Block Addressing (LBA) that allows the BIOS to access the attached storage hardware with _____ Linux: what is reference by root in GRUB the filesystem where GRUB searches for configuration kernel and RAM filesystem image files Linux: what is initrd command in specifies the file for the initial RAM filesystem GRUB configuration Linux: what does ls doe on GRUB command list of devices known to GRUB line Linux: what does msdos prefix indicate the disk contains MBR partition when running ls on GRUB command line Linux: when running ls on GRUB command the disk contains a GPT partition line what does gpt indicate Linux: how to see the root location on GRUB echo $root command line Linux: how to see the files on root on GRUB ls ($root) command line Linux: how to see the /boot directory on ls ($root)/boot GRUB command line Linux: how to view all currently set GRUB set variables on command line Linux: what is the $prefix variable on GRUB the filesystem and directory where the GRUB command line expects its configuration and auxiliary support Linux: how to boot the current configuration boot from GRUB command line Linux: every file in ____ is a shell script that /etc/grub.d produces a piece of the gurb.cfg file Linux: how to see what physical networking nmcli dev status devices are present on computer Linux: what does it take to allow network They need a configuration file, called devices to achieve connectivity "connection profile".  They are located in /etc/sysconfig/network-scripts directory and the name of files start with ifcfg- Linux: device vs interface vs connection device = piece of hardware interface = the hole you plug a network cable into connection - the physical connection between interface on the computer and the interface on a second network device (switch, router, etc.) Linux: HPC high performance computing, i.e. Linux: Hyperscale the ability of an architecture to scale appropriately as increased demand is added to the system Linux: DRM - subsystem of the Linux kernel, interfaces with the GPUs of modern video cards Linux: what is the subsystem of Linux kernel DRM - Direct Rendering Manager that interfaces with the GPUs of modern video cards Linux: file path to DRM (Direct Rendering /sys/class/drm Manager) Linux: fbdev is a graphics hardware-independent abstraction layer to show graphics on a monitor, typically on the console Linux: framebuffer means part of a video memory containing a current video frame Linux: file path to Linux Framebuffer device /dev/fb0, /dev/fb1, etc Linux: ( ) input/output control - a system call for device specific input/output operations which can not be expressed in regular system calls Linux: KMS Kernel Mode Setting - subpart of DRM Linux: file path to access DRM api /dev/dri/renderX Linux: file path to KMS api /dev/dri/controlDX Linux: DRI Direct Rendering Infrastructure - framework for allowing direct access to graphics hardware.  Main use is to provide hardware acceleration for implementation of OpenGL Category: Files - (69 questions) Utility to display text file to screen cat Utility to delete a file rm Utility that makes a copy of a file cp 2 utilities to copy a file from one system to scp and ftp another Linux: How do you copy a file and get a cp -i (interactive) option prompt before overwriting Utility to rename a file without making a copy mv (move it) Utility to display the beginning of a file head

Utility to display the ending of a file tail Utility to learn about the contents of any file file without having to open and examine the file yourself

2 utilities to convert from Windows/Macintosh unix2dos to Linux and from Linux to dos2unix Window/Macintosh file format

Define: Linux FHS Filesystem Heirarchy Standard - making sure that key programs are located in standard locations Define: link equivalent to Window's shortcut - allows a file to be accessed by means of 2 or more names Define: LVM logical volume manager - allows you to change the size of logical volumes Utility to update the access and modification touch time of files to the current time Linux: How do you adds read and write chmod a+rw filenamea stands for all+ for permissions for all users addingrw for read / write What kind of file has .o extension object code for a c program

What kind of file has a .ps extension A PostScript file; view with gs under a GUI What is a file name that name starts with a A filename that begins with a period is called period (.) a hidden filename (or a hidden file or sometimes an invisible file) because ls does not normally display Linux: What is the significance of ~/ (a tilde expands into the pathname of your home followed by a slash) at the start of a directory. pathname How do you recursively remove a directory rmdir -r and every thing below it

Linux: How can you see the file permissions ls -l When you run ls -l what do the first 10 first character can be - for a file or d for a columns returned tell you about the file directory next 3 columns are the permissions for file owner next 3 columns are the permissions for group next 3 columns are the permission for everyone else

Linux - How do you remove read and chmod o-rx filename execute permissions for users other than the owner of the file and members of the group the file is associated with How do you use chmod to change use g for group and u for user (owner) permissions for group and user permissions chmod g chmod u On chmod what does o and u stand for when o - other changing permissions u - user (owner)

How can ACL impact performance reduce performance utility modifies a file's ACL setfacl utility displays a file's ACL getfacl Linux: Two kinds of links hard links and symbolic (soft) links. Hard links are older and becoming outdated. Define: hard link to a file appears as another file. If the file appears in the same directory as the linked-to file, the links must have different filenames because two files in the same directory cannot have the same name. You can create a hard link to a file only from within the filesystem that holds the file. utility creates a hard link to an existing file ln existing-file new-link using the following syntax

Define: inode is the control structure for a file. If the two filenames have the same inode number, they share the same control structure and are links to the same file. How can you determine a file's inode ls with the -i option to determine without a doubt which files are linked. The -i option lists the inode number for each file. ls -i

Define: symbolic link an indirect pointer to a file (the directory entry contains the pathname of the pointed-to file;a pointer to the hard link to the file).Symbolic links were developed because of the limitations inherent in hard links. You cannot create a hard link to a directory, but you can create a symbolic link to a directory.

How do you create a symbolic link ln with -s option to create a symbolic link.

Utility to check disk space df Type df -h to get a more easily readable version of the output.

Linux: Deletes a file securely by overwriting shredMost common use: shred -v filename its contents (replace filename with your specific file) The -v option is useful since it provides extra view of what exactly the shred tool is doing while you wait. Filename extension .a Archive file (library) Filename extension .s Assembly language code Utility to change the group that a file belongs chgrp group filename to Linux: command to change the file's owner chown owner filename Show the current working directory pwd

Linux: How would you copy an entire use the -a flag with cpcp -a old_dir new_dir directory What is the significance of a file starting with hidden file - will only see if ls -a is used a period . Linux: command to generate a file of null dd if=/dev/zero of=file.txt count=1024 characters of a given size bs=1024/dev/zero is special location that returns null characterit generated count*bs data in the file Linux: what is the dd command for convert and copy a file according to command line flags Linux: command to create a file with random dd if=/dev/urandom of=file.txt bs=1024 characters of certain size count=10the /dev/urandom generates random characters Linux - what are ELF binaries executable and linkable formatcommon standard file format for executables, object code, shared libraries, and core dumps Linux - command to classify files according file to the data they contain Linux - list shared objects that would be ldd -v loaded if file were executed Linux - list open Internet files / sockets lsof -i Linux - list of open files owned by user lsof -u foo Linux - list of processes, owners, and open lsof /path/to/file file descriptors that are currently using a specific file Linux - list of all open internet files or files lsof -i -u foobar opened by user foobar Linux - display all internet files that are lsof -i -a -u foobar opened by foobar Linux - find out what processes that have lsof -i TCP:80 opened HTTP port 80 Linux - what files do users "foobar" and lsof -u foobar,apache "apache" have open Linux - what UDP ports are in use by user lsof -i UDP -a -u foobar "foobar" Linux - syntax to use scp to copy a file to a scp /path/to/local/file remote machine username@hostname:/path/to/copy/to Linux - how to sort a file based on a sort -k 3 particular column Linux - how to specify separator for sort -t flag followed by separatorsort -t: -k 4 when picking a column Linux - sort based on 2nd and 4th column sort -k2,2n -k4,4n being numeric Linux - how to get sort to randomly jumble sort -R lines Linux - find a file in a directory structure and find ./ -iname "myfile" case insensitive Linux - find a file with text myFunction in a grep -R myFunction ./ directory structure Linux - how to exclude .svn directories when --exclude-dir=.svn grep for text myFunction Linux: when is .bash_profile loaded when you login either via ssh or local shell account Linux: when is .bashrc used non-interactive login shells Linux: how to get a list of shell versions cat /etc/shells available Category: Basic Commands - (33 questions) Utility to remove a job from print queue lprm 2 utilities to display text one screen at a time less in shell more

What is the difference between utilities less less - displays an EOF message and waits and more for you to press q before going back to shell more - goes straight back to shell at end of text

Utility to display the system name hostname 2 ways to see which jobs are in the print lpq queue lpstat -o

Command sequence to search for running ps -A | grep "process_name" process Text based browser available from command lynx line Utility to set your server's date and time Type date followed by the two digit month, the two digit date, the two digit time, and two digit minutes. The syntax is easy enough and resembles this: MMDDhhmm Utility to kill a running process kill process id number Utility that will log your account out of the logout system. Utility runs nice programs even when you're Nohup (think no hangup) logged off the system

3 steps to install most programs ./configure make make install What is /dev/null the null bit bucket - so nowhere Define: Gambas is a programming language for Linux which attempts to mimic the ease of use of Visual Basic while improving on its functionality. Although Gambas is not compatible with Visual Basic, it is a BASIC Interpreter with object-oriented extensions. This makes Gambas a good choice for Linux users who want to use their VB knowledge on a GNU basis. A graceful way to run kill kill -USR1 pid lets the child processes run to completion, finishing any client transactions in progress

Define: ttys Unix terminals are still referred to as teletypes How do you end a login session exit or logout or CTRL-D Linux: Utility that translates characters in the tr input to other characters Linux: How can you append the output of use operator >> filename one command to an existing file What pattern does regular expression [a-z]a any lower case character a through z match followed by an a What pattern does regular expression n or N followed by zero or more e followed by [nN]e*d match d need, Ned, nd, etc How do you make a regular expression ^ for the beginning of line specify to match a pattern when it is at the $ for the end of the line beginning or end of a line.

How could you specify the number of lines use the -n option followed by number of lines head and tail displays tail -n 15 file_name What does the command tail -f do continues to output information to screen as the file grows (it is the follow option) How do you restart a program in the use the background command - bg background after pausing it with CTL-Z How do you bring a job to the foreground fg - foreground command that has been run in background Utility that offers hyper-texted menu-based info help system

More intuitive version of info pinfo What option can you add to most GNU --help utilities to get help text Linux - do a case insensitive sort must set locale in environmentexport LC_ALL=Csort -f -s file.txt Linux - sort a file based on numbers sort -n filename Linux - how to sort while ignoring leading sort -b file blanks Linux - find / replace in a text file cat file | sed s/original/new/ > newFile Category: Shell - (14 questions) Command to record a shell session script Define: zsh Z shell - incorporates features from a number of shells, including the Korn Shell Define: tcsh TC Shell - enhanced version of the C Shell Command allows you to view a listing of your stty current terminal options. To automatically re-display the last command !! you typed at the prompt, type: What is the program: sh Bourne shell Program name: csh C shell How do you determine what shell you are echo $SHELL using How do you invoke bash shell if on system bash Shell command to reset erase and line kills stty ek to default values Linux - how to kill an unresponsive ssh newline followed by --. session GNU tools for viewing wide range of info objdump about ELF files Linux - command to write messages to a logger "message"-f switch sets a particular syslog / log file file Linux - how to target one command to run in $( cmd1 ) another command Category: Searching - (12 questions) Option to use grep to search for whole words grep -w only Utility that searches standard PATH locations which for file location Utility that searches standard locations whereis instead of standard path like which Utility that searches for a command if you apropos don't know the name by searching man pages for keyword What is the database that apropos uses for whatis search Another version of apropos but only whatis searches with complete word match for keyword Program to access system help text man

Command to locate a file on system locate filename or find path -name file_name

How can you can tell grep to ignore the case use the -i option grep -i string file How can you use grep to search for use the -v option grep -v string file everything but the string How do you search for a string when using hit the / key then enter the string to search less and more for Difference between find, which, and locate which - searchs PATH locations commands locate - uses a database that is updated with cron job find - actually looks actively from a start directory

Category: Users - (10 questions) Linux How do you find out who you are who am i logged on as, when and where What are 2 utilities that give more detailed finger than who about logged on users w

Utlity to send a message to logged on user write Utility to deny or accept messages via write mesg n mesg y

Command that tells you who is logged on who Linux: Utility to create a group adduser -group groupname Utility to create a user adduser username useradd username - new way

How do you send a message to all the wall (stands for "write all") logged on users on system

How do you create a message of the day create a file /etc/motd what appears when a user logs on

Linux: How do you change what is /etc/issue file presented before login prompt? Category: Desktop - (12 questions) 2 most popular desktop managers GNOME KDE Define: Kickstart Red Hat's program that completely or partially automates the same installation and postinstallation configuration on one or more machines Define: X Window System a design and set of tools for writing flexible, portable windowing applications, created jointly by researchers at MIT and several leading computer manufacturers Utility to display the X-Windows settings system-config-display What file contains the settings for the /etc/X11/xorg.conf X-Windows system Define: gdm GNOME display manager - provides graphical login Define: GNOME user-friendly desktop manager - product of GNU project Define: KDE K Desktop Environment - powerful desktop manager Utility to tell the system which desktop - switchdesk GNOME or KDE you want to log into How do you start GUI from a terminal prompt startx What is the default window manager for metacity GNOME What is the default window manager for KDE kwin Category: Daemons - (10 questions) Define: Bind Berkeley Internet Name Domain - The software package that a DNS server typically runs What is the daemon the Bind runs named What is the main configuration file for Bind /etc/named.conf Name of the configuration file for Apache httpd.conf The cron daemon needs some instructions crontab files on what to run and when to run it. These instructions are contained in ____ What is the xinetd daemon the extended Internet services daemon. The daemon is configured to listen on a bunch of different ports for incoming packets. Then it starts the required service when it's needed. The reason for this is that it saves system resources by not having every service running all of the time. What was used before xinetd inetd How would you restart the older inetd kill -HUP #pid HUP stands for hang up daemon Where are the network services on a server either in a file called /etc/xinetd.conf or in a configured for xinetd service specific file located in the /etc/xinetd.d directory. Command line to restart Apache apachectl restart Category: Red Hat - (3 questions) Utility used to manage installing program rpm - Red Hat Package Manager packages Red Hat Define: Anaconda Red Hat installation tool with GUI interface Red Hat Linux officially supports ACLs on ext2 and ext3 what 2 filesystems Category: Editors - (6 questions) Easy to use command line editors that are nano or joe often included with the major Linux flavors Bash: Command to clean up your command clear prompt window What is the utility nano basic text editor 2 most popular UNIX editors vi emacs What was vi editor initally designed for editing source code in C and LISP What is the pico program lightweight text editor that is a derivative of Pine mail reader Category: Security - (17 questions) Utility to change password password What kind of permissions do you need to r - read permission execute a shell script What happens when you execute a file that the process executing the file takes on the has setuid (set user ID) permission privileges of the file's owner. For example, if you run a setuid program that removes all files in a directory, you can remove files in any of the file owner's directories, even if you do not normally have permission to do so. What port numbers can only be used by the below 1024 superuser (root, under Unix) Command if you need to find out information last about when a user last logged in or where they've been logging in from The password file, located in _____ contains /etc/passwd all of the information for a user's account. Define: the shadow file The shadow file, /etc/shadow, contains a bunch of one line entries, much like the password file. The shadow file contains a lot of information that allows an administrator to set an expiration date for a users password. This forces the user to change their password on a regular basis, thus increasing security. To remove a user's account userdel you need to do three things. Remove their entries from /etc/passwd and /etc/shadow. Also you'll want to remove their home directory. You can either do this manually or with userdel. The -r option tells userdel to remove the user's home directory as well. If you want to test out this options yourself you'll need to re-add the account first.

Sometimes we don't want to remove an by adding a star (*) to the beginning of their account, but we need to disable it encrypted password in /etc/shadow using a temporarily. A common way of doing this is text editor. by_____ Command to log on as root when you are su already in shell Define: access control is our ability to restrict who is allowed to connect to our server and use the services it offers. This lets us restrict untrusted hosts and/or networks. Perhaps we have a server that needs access to the internet, but we only want to be able to connect to it from a few computers. Maybe we want everyone to be able to FTP to our machine, but we'd like to restrict who is allowed to telnet. All of this can be done by configuring the access control files. How do you configure server access control There are two configuration files that are used to setup access control. These are: /etc/hosts.allow /etc/hosts.deny How do you use /etc/host.deny to block all add line: access from host the.badguys.com ALL : the.badguys.com How do you use /etc/host.deny to block all add line: access from any host of badguys.com ALL : .badguys.com the leading period is wildcard for any host with badguys.com

How do you use /etc/host.deny to block all add line: ALL : 199.3.14. access from an IP range How would you implement a mostly closed put all the hosts you want to give access to access security policy in the /etc/hosts.allow file then at the top of the /ect/hosts.deny file have the single line : ALL : ALL

How would you use the numerical method The first digit is used to change the with chmod command permissions of the owner the second digit is used change the permissions of the group the third digit is used to change the permissions of all other people To determine the number you need to use, you will have to use a little addition. The sum of the numbers represent the permission that will be set for the file: 4 = Read 2 = Write 1 = eXecute To give the owner read and write permissions, you would add 2 + 4, so the first digit would be 6. Category: Network - (19 questions) command prints a summary of the amount of du -s print the sum of bytes in your information you have stored in your directories directories on the mounted disks. Command mostly used for checking existing arp Ethernet connectivity and IP address Command line tool to configure or check all ifconfig network cards/interfaces Linux: summary of network connections and netstat status of sockets Checks the domain name and IP information nslookup of a domain name www.hostname.com Most common use: nslookup www.hostname.com Lists the routing tables for your server route Most common use: route -v This is pretty much the exact same output as the command netstat -r. You can suit yourself which you prefer to run.

Traces the existing network routing for a traceroute remote or local server Most common use: traceroute hostname (replace hostname with the name of your server such as reallylinux.com) Utility which binds IP addresses to physical ifconfig interfaces What program listens for incoming ssh sshd connections What file contains a mapping of the services /etc/services running on server to port numbers Command to set up a default gateway for route add default gw xxx.xxx.xxx.xxx traffic outside local network Command to remove the default gateway route del default from computer Command to remove a network card from ifconfig eth0 down being used Command to add a network card to ifconfig eth0 xx.xx.xx.xx netmask xx.xx.xx.xx configuration When a Unix machine needs to translate a /etc/hosts hostname into an IP address the first thing it does is to consult a local file called ____ Let's say we're looking for an IP address that the /etc/resolv.conf file is used to find DNS isn't in /etc/hosts. What happens next? servers to use How can we find out more about a domain whois name? Who owns it? What are the names of it's DNS servers? Command to find ip address of host name host hostname

How do you check the local loopback ifconfig lo network configuration Category: Server Admin - (19 questions) Linux: Allows you to change the server initMost common use: init 5 bootup on a specific run level The super-user do command that allows you sudo to run specific commands that require root Most common use: sudo command (replace access. command with your specific one) This command is useful when you are logged into a server and attempt a command that requires super-user or root privileges. In most cases, you can simply run the command through sudo, without having to log in as root. In fact, this is a very beneficial way to administer your server without daily use of the root login, which is potentially dangerous.

Utility that is a very useful system top administrator tool that basically gives you a summary view of the system including number of users, memory usage, CPU usage, and active processes. The messages file contains information all connections (telnet and ssh) to the server. about _____ Linux: The logs are usually stored in the /var/log _____ directory When the system is rebooted, it will always /etc/rc.d/rc.local execute the commands found in ____ Linux: system logs are created by _____ syslogd program The location for all of the log files and their /etc/syslog.conf contents is specified by the syslog configuration file located in ____ How do you edit the cron file crontab -e How do you change the default editor used export EDITOR=editor by programs like cron Linux command to shutdown and reboot shutdown -r now server Where can you find startup scripts for many /etc/rc.d/init.d directory different daemons installed on the system.

Command to show the amount of time a uptime server has been running since last reboot Linux - Command to add a directory to the export PATH=$PATH:new_dir PATH environment variable What kernel version is it running? How did uname -a you determine this? Linux: Command to show what process are ps running for the current session How can you modify kill to where it can't be use the -9 option kill -9 pid ignored How do you get ps to show all the processes ps aux that are running Command to create a log file and begin tee [logfile] logging all monitor activity to that file / notee suspend logging

Category: Email - (8 questions) Command to find the mail exchanger for a nslookup -type=MX useractive.com domain What is the configuration file for sendmail /etc/sendmail.cf What program can be used to read mail on pine bash shell command line prompt

What is the LDA for most Linux systems procmail What file will let you configure procmail to ~username/.procmailrc filter messages for a particular user There are many cases when an email sent to create a .forward file in the home directory of one account needs to be forwarded to the account that needs to have it's mail another account. The simplest method would forwarded. be to ____ Where would you set up email aliases /ect/aliases (sometimes in /etc/mail/aliases ) Changes to /etc/aliases don't take effect right newaliases away. We have to run ____ to create the alias database that sendmail uses Category: Archive/Compression - (13 questions) Use of cpio utility similar to tar for creating archives What program compresses files with a gz2 bzip2 file ending What utility is used to decompress a bzip2 bunzip2 file with bz2 ending How do you display a bz2 file without bzcat decompressing Utility used to decompress a file with a .gz gunzip or gzip -d filename file ending Linux: How would you display contents of zcat file with .gz ending without decompressing Compare gzip with zip gzip is GNU zip utility zip - used for Windows systems

What option do you use with tar utility to just tar -t display file names in archive What option is used with tar utility to extract tar -x files from archive Utility used to compress a file with tar.gz gzip extention

How do you uncompress a file with tar.Z with the tar utility with following options tar extension -zxvf Full line to unpack a .tar file tar xvf filename.tar Command to create a new tar archive to a c for creating new file and f to indicate to a file file tar -cf tar_filename.tar directory

Category: EMACS - Linux - (9 questions) How do you save a file Ctl-X Ctl-S How do you exit the EMACS program Ctl-x Ctrl-c Emac - How do you get editor to do Meta-x auto-fill-modeTo do this, hold down automatic word wrapping the ESC key and then type x. You will see the text M-x displayed in the command line. Type in auto-fill-mode here and hit Enter. Notice that the word Fill is now included inside of the parenthesis along with the word Text. Bash: How can you cut a line of text out into CTL-k clipboard for pasting How do you paste something from clipboard CTL-y into file Bash: How do you page up and down in text page up - ESC-vpage down - CTL-v file How do you search for text in file CTL-s to enter I-search then type in text and it will go to the first occurance CTL-s again to go to next occurance, to stop searching hit ENTER Emacs: How do you do search and replace type ESC-x replace-string.Then type sting to replace and hit Enter. You should see the text Replace string: Hello displayed in the command line.Now, type the string you want to use to replace it. Replace string: Hello with: Hi Then hit Enter again. How can you cancel an ongoing command CTRL-g Category: Bootup - (14 questions) Linux - what directories tell init which startup symbolic links from /etc/rc1.d - rc6.dto the scripts to run for each level actual script in /etc/init.d Linux - init process' primary role is ______to create processes from a script stored in the file /etc/inittab Linux - naming syntax for scripts in rc#.d begins with S or K followed by priority directories (# is 1 through 6) number then nameS is for startupK is for shutdownex: S20apached Linux - what is the purpose of /etc/inittab file describes which processes are started at bootup and during normal operations Linux - valid run levels for init startup process 0 - 6 and A, B, C for on demand Linux - command to change init levels telinit Linux - each time a child terminates, init records the fact and reason ______in/var/run/utmp/var/log/wtmp Linux - command that opens a tty port, and getty prompts for a login name, normally invoked by init Linux - where should startup scripts be /etc/init.d directory placed Linux - command line tool for maintaining chkconfig the /etc/rc[0-6].d directory hierarchy by manipulating symbolic links there Linux - how to find which start levels a chkconfig --list name service is configured to start up automatically Linux - each service which should be 2 or more commented lines added to the managed by chkconfig needs ______services init.d script# chkconfig 2345 20 80# description saves and restores entropy pool Linux - what are override files for chkconfig files in the /etc/checkconfig.d/servicenameare parsed like comments in the init.d scripts and override values from there Linux - ____ is the parent of all processes init