Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Linux+ LX0-101

Comptia Linux+ Exam 1

QuestionAnswer
IRQ 0? System Timer
IRQ 1? Keyboard
IRQ 2? Cascade (Handles IRQ 8-15)
IRQ 3? COM2/4
IRQ 4? COM1/3
IRQ 5? LPT2/Sound Card
IRQ 6? Floppy Controller
IRQ 7? Parallel Port
IRQ 8? Real Time Clock
IRQ 9-11? Available
IRQ 12? PS2 Mouse
IRQ 13? Floating Point Proc (Math co processor)
IRQ 14? Primary IDE
IRQ 15? Secondary IDE
What is DMA? Direct Memory Access, devices can bypass the CPU to communicate with each other using DMA controller and RAM.
What is /proc/interrupts? Interrupts to the CPU allow different devices to talk to the processors. IRQs shown in file.
What is /proc/ioports? Shows unique memory address range for different I/O devices.
What is /proc/dma? Shows which devices have DMA allowed.
What is /proc/pci? Shows all the devices on the pci buses (old)
What is /sys? Sysfs, virtual file system which exports device and driver info from the kernel device model to user space. Used for config.
What is HAL? Hardware Abstraction Layer Daemon (hald), built on top of udev, allows desktop application to discover and use hardware through an API (application programming interface)
What is udev? In Linux the /dev directory is dynamic and udev is a device manager which manages that directory, allows for hot-plugging.
What is dbus? Inter-process communications system (IPC) allows multi concurrently-running processes to communicate with one another.
What command is used to query and configure PCI devices? Couple of common options? setpci (-v= verbose, -f= force)
What command is used to show the pci buses in the system and devices connected to them? lspci (-v[v[v]]= levels of verbose)
what command is used to show usb devices in the system and devices connected to them? lsusb (-v= verbose)
What is usbmgr and hotplug? Tools used to manage USB devices since Linux kernel wasn't designed to handle USB. Monitor and detect changes to USB bus.
What are kernel modules? Code to extend base kernel, normally used to add support for new hardware and filesystems. /lib/modules where drivers are stored.
What command shows the modules currently loaded and their status? lsmod, very simple program which nicely formats the contents of /proc/modules
Which command loads a single module into the Linux kernel? insmod, very simple takes the file name to load the module
Which command unloads a module? rmmod, very simple takes the module name to unload
Which command can load or unload a module as well as it's dependencies? modprobe, -r= remove, -n= dry run, v= verbose, takes the module name
What do PATA disks show up as in /dev? /dev/hdx
What do SATA disks show up as in /dev? /dev/sdx, same as SCSI
what do USB disks show up as in /dev? /dev/sdx, same as SCSI
What does CDROM show up as in /dev? /dev/cdrom or /dev/sr0
Where do error/system messages get stored, which log file and where is it? /var/log/messages is the general location for all error and system messages. There are other log files which are more specific.
What is the kernel ring buffer? linux kernel and log information is stored here, some of this info also scrolls on screen very quickly at boot up
What command lets you print or control the kernel ring buffer? dmesg (-c= clear after print, -r= raw, shows log level prefixes)
What is BIOS? Basic Input/Output System, this is the first software run by the CPU after power on. Initializes and tests system hardware components and loads the bootloader.
What is a bootloader? Loaded by BIOS the bootloader is reponsible for loading the Linux (or other OS) kernel into memory and to start it up (possibly with special options). Contained within the MBR.
What is the kernel? Primarily it's function is to manage the computer hardware and resources and allow other programs to run and use them. The connection between applications and the HW.
What is init? init is the first process run by the kernel, it reads the /etc/inittab to find out default runlevel and which other programs to run.
What is the Linux boot order? BIOS >> POST >> BOOTLOADER >> KERNEL >> INIT
How do you set the default runlevel? /etc/inittab, id:#:initdefault:, #= the default runlevel
What is single user mode? Used for low level system maintenance impaired by normal operation (resizing partition), specific services vary by distro.
How can you boot to single user mode? Add the option: single, 1, s, or S to the kernel line in GRUB. Or change to it using init or telinit
What command can you use to change runlevels? init #, or telinit #, both change the runlevel to #. Shutdown, reboot, halt, poweroff also change runlevel to either 0 or 6 depending on options.
What is runlevel 0? shutdown, poweroff
What is runlevel 1? single user mode, also called s or S
What is runlevel 6? reboot
What is runlevel 3? multi-user console login
What is runlevel 5? multi-user GUI login
What command can you use to powerdown the computer? shutdown, it also takes a time argument like: 'now' '13:52' '+15'(minutes) as well as a string after the time to send users a message.
What are important options to the shutdown command? -r= reset, -H= halt, terminate operations but dont shutdown, -P= powers off, -c= cancel previous shutdown command
What command can you use to restart the computer? reboot; halt, and poweroff are basically the same command as well but do their seperate functions.
What is the difference between shutdown and init 0? Shutdown will turn off processes more cleanly and will also warn users about the shutdown happening (and not let others log in). Shutdown is better to use.
How does init know what to start up for various run levels? There are various startup scripts in /etc/rc.d/ or /etc/init.d/rc/ which say to start or stop services.
What is contained in /etc/init.d/? All of the services which init can start are located there which you can use: /etc/init.d/network restart
What is systemd? Replaces init, newer, handles dependencies, concurrent or parallel processing and reduces computational overhead of the shell.
What is upstart? Event based replacement of init, since init generally just made to start and shutdown well. Upstart is better at handling USB pen drive addition/removal, discovery+scanning new storage devices, loading firmware.
What is swap? Setting part of the hard disk to be part of the virtual memory of the machine. Useful when needing to start large programs and allows better memory management.
How much swap should be set? 1x RAM >> 2x RAM
Which directories should be set to separate partitions? /, /home, /var, /boot, swap, /usr, /tmp, /opt, /usr/local
What is the /boot directory? Holds the critical boot files, separate partition allows you to circumvent older BIOS and boot loader limitations on drives over 8GB
What is the /usr directory? Holds most Linux programs and data files
What is the /usr/local directory? Holds Linux programs and data files unique to this installation, especially if compiled manually
What is the /opt directory? Holds Linux commercial programs and data files, like word processors and games.
What is the /var directory? Miscellaneous files associated with day-to-day operation of computer, server services often store files here.
Which directories should NOT be set to separate partitions? /etc, /bin, /sbin, /lib, and /dev. Critical for Linux operation (/etc/fstab, /bin/mount, etc)
What is LVM? Logical Volume Manager. Allows disks to be added and replaced without downtime or service disruption, allows for easy volume resizing
What are the disadvantages to LVM? Adds complexity, complicates disaster recovery, failures of a single disk can affect others.
What are the advantages to partitioning? Multi OS, multi filesystem, security, backup, disk space management.
Where is the grub config located? /boot/grub/grub.conf or /boot/grub/menu.lst
How would GRUB write out /dev/sdb3, and /dev/sdc1? (hd1,2) and (hd2,0)
What is the default line for in Grub? Which OS to boot, 0 is the first OS listed, 1 is the second, etc.
What is the timeout line for in Grub? How long to wait (in seconds) for user input before going to default OS
What is the splashimage line for in Grub? The graphic which is displayed in background during the boot process
What is the title line for in Grub? begins a per-image stanza, this is what will show up in the boot menu so can be any string
What is the root line for in Grub? Specifies grubs root partition, /boot partition if it is separate from /, otherwise / partition
What is the kernel line for in Grub? Location of the kernel to load as well as any options that are passed to it, like root=/dev/sda1, single to boot into single-user mode, ro for read-only.
Which command is used to install GRUB? grub-install /dev/sda OR grub-install '(hd0)'
Where does GRUB get installed to? First sector (the MBR) of designated boot device.
What is the MBR? Master Boot Record, contains the primary boot loader (GRUB legacy or GRUB 2), some of the first data loaded when computer boots up. Info on how partitions are organized on disk.
What button used to edit a stanza in GRUB menu? e
What button used to goto a CLI in GRUB menu? c
What is a superblock? Keeps metadata on a filesystem like: type, size, status, etc.
Where is the GRUB2 config file located? boot/grub2/grub.cfg, NO LONGER EDIT IT DIRECTLY THOUGH!
How do you make changes to settings in GRUB2? vi /etc/default/grub = simple text file to edit default config settings
If you make changes to GRUB2 settings, how do you save them to the config file? grub2-mkconfig -o /boot/grub2/grub.cfg ; -o= send output to file, not screen
What command can you use to change the default selection of GRUB2? grub2-set-default <#> ; Still need to use grub2-mkconfig -o /boot/grub2/grub.cfg afterwards to save changes.
What command prints shared library dependencies? ldd, ex: ldd /bin/ls
What command reloads the library path to cache? ldconfig
Where is the library path configured? /etc/ld.so.conf ; if changes are made here you must use ldconfig command to reload to cache
Which directories are automatically placed in library path? /lib and /usr/lib, even though they are not listed in ld.so.conf
Which environment variable can be used for library paths? LD_LIBRARY_PATH, if you set this variable it will be checked before paths in /etc/ld.so.conf
What command would you use to install, remove, and keep track of packages in Debian? dpkg
What command would you use to list packages installed in Debian? dpkg -l (or --list) [search pattern] AND apt-cache pkgnames [search pattern] ; can use glob patterns in search pattern
What command and option would you use to install a package in Debian? dpkg -i <filename>
What command would you use to show information on a package in Debian? dpkg -I <packagename>
What command would you use to show all the files of a package in Debian? dpkg --listfiles <packagename>
What command would you use to show which package owns a file in Debian? dpkg -S (or --search) <filename or dir>
What command would you use to reconfigure a package in Debian? dpkg-reconfigure <packagename> ; some packages have options you set when you first set them up, this lets you set them up again.
What command would you use to show package dependencies in Debian? apt-cache showpkg <packagename> AND apt-cache rdepends <packagename>
What command would you use to list general data on all installed packages in Debian? apt-cache stats ; shows things like # of packages, # of dependencies, size they take up.
What command would you use to show unmet dependencies of packages in Debian? apt-cache unmet
What command would you use to list packages depending on a package in Debian? apt-cache depends <packagename>
What command would you use to search for packages to install in Debian? apt-cache search <search pattern> ; finds not only names but purposes of packages
Where are the software repositories located and set up in Debian? /etc/apt/sources.list
What command would you use to update the package cache in Debian? apt-get update
What command would you use to update all packages in Debian? apt-get upgrade [packagename] ; if you include package name will only try to update that package
What command would you use to install a package and all dependencies in Debian? apt-get install <packagename>
What command would you use to remove a package and its dependencies in Debian? apt-get remove <packagename>
What command would you use to remove a package (and all it's configuration files) in Debian? dpkg --purge <packagename> ; -r will only remove the package not configs
What is the purpose of aptitude in Debian? interactive text-based package manager, with some menus, some command line options can be done non interactively as well.
What are some common options to aptitude in Debian? search <string>; update (same function as apt-get update); install <name>; remove <name>; safe-upgrade; full-upgrade
What command would you use to install a package from file? rpm -i <filename> (-h would give hash marks for progress)
What command would you use to list all the packages installed on computer? rpm -qa (query all)
What command would you use to remove an installed package? rpm -e <packagename>
What command would you use to update a package? rpm -u <packagename> (-F also works, freshen)
What command would you use to get information on a package? rpm -qpi <filename> (query package information)
What command would you use to show the files in a package? rpm -qpl <filename> (query package list)
What command would you use to get information on an installed package? rpm -qi <packagename> (query info)
What command would you use to check what package a file belongs to? rpm -qf <filepath> (query file)
How can you convert an RPM package file to a archive file? rpm2cpio <filename> > <archivefilename>
What command would you use to search for a package through repositories? yum search <pattern> ; finds package names and description matches
What command would you use to install a package and all dependencies? yum install <packagename>
What command would you use to remove a package and all dependencies? yum remove <packagename>
What command would you use to show info on a package from repositories? yum info <packagename>
Where are the repositories stored for yum? /etc/yum.repos.d/ ; multiple files in this directory contain repositories
Where is the main yum config file? What important info in it? /etc/yum.conf ; you can place repository data in this file as well.
What command can you use to download rpm files from repositories? yumdownloader <packagename>
What command can you use to check the integrity and signature of a RPM package? rpm -K <filename> ; if no signature use --nosignature, -K just checks md5 hash (was it downloaded ok)
What command can you use to check the integrity and signature of a Debian package? apt-key
What command is used to run another command in a modified environment (changed environment variables)? env [options] [environmentvariable=value] [command [args] ] ; env by itself lists all environment variables
What command is used to run a command or script in a new shell instead of the current one? exec [command [args] ] ; leaves the shell when command is done.
What command is used to make a local variable a environment variable? export [varname[=word]] ; varname is the name of the variable and optionally you can set it at the same time with = after it.
What command is used to show current working directory? pwd
What command is used to change attributes of shell operations like not allowing overwriting of existing files with > and giving an error when a glob doesn't match? set ; many of them use the -o [option] method of setting things, this is seen most often in .bash_profile or .bashrc ; +o turns off instead of on
What command is used to remove a local variable or environment variable? unset [name]
What command is used to print various system information? uname ; returns kernel name by default, -p = processor, -n= hostname, -v= kernel version
Where is your command history stored? .bash_history
What is the common default shell? What are some other popular shells? Bash. tcshm, csh, ksh, zsh are others
What environment variable contains the default shell? $SHELL
Where is default shell set for users? /etc/passwd, the final field
What command lists shells available for user? chsh -l = shows shells in /etc/shells, chsh -s /bin/ksh = is used to change default shell for next login
What is the meaning of entering !g on the command line? !g would run the most recent command from history which started with a g
What is the difference between local and environment variables? local variables are only usable in one specific shell, environment for all shells.
What are some of the common built in commands? How can you list them all? pwd, echo, test, exec, set, history. help is used to list them all.
What is the difference between built in pwd and /bin/pwd? built in will show current directory as if you were in a symbolic link, /bin/pwd shows true working directory (same as pwd -P)
What command is used to display contents of a file to the screen? cat, good for looking at small files, less better for longer ones. -a = shows hidden characters like end of line
What command is used to display the beginning or end of a file? head = beginning, tail = end, default = 10 lines, -# (or -n #) = show # lines, tail -f [logfile] = useful for looking at a changing file.
What command is used to display only selected parts of lines from a file? cut [option] file ; cut -f 1,5-7 -d : /etc/passwd = only shows the 1st and 5-7th fields of /etc/passwd, uses : to deliniate instead of tab spacing; cut -c 1-6 file = display first 6 character of lines in file
What command is used to convert tabs to spaces in a file? expand file ; can also be used to change the number of spaces or from something besides tab spacing; unexpand does the opposite
What command is used to convert the length of characters per line in a file? fmt -# file ; # = character length of line, default is 75
What command can be used to view binary files which would mess with screen normally if you cat them? od ; default displays in octal but can change it to display other formats including ascii
What command is used to combine 2 files based on fields in the files? join file1 file2 ; default field is the 1st one. 1 Ottawa + 1 Ontario = 1 Ottawa Ontario; join -1 3 -2 1 file1 file2 = join by fiel 3 in file 1 and field 1 in file2
What command numbers the lines of a file and displays in stdout? nl ; a= all lines, t= only non empty,
What command is used to combine 2 files line by line? paste file1 file2
What command prepares a text file for printing? pr
How do you use the sed command to replace text? s/regexp/replacement ; so to replace the first instance of the word 'the' with 'man' per line its sed 's/the/man' file > file2 ; for all instances its sed 's/the/man/g'
What command and options are used to sort lines of a text file? sort [option] file ; -n= numberic, -r= reverse, -d= dictionairy (alphanumeric)
What command is used to split a file into pieces? split [options] file [prefix] ; default is 1000 lines, prefix is new filename, will be called prefixaa, prefixab, prefixac...
What command is used to change or delete characters from a file? tr this that < input.txt ; changes this to that of input.txt file and outputs to screen
What command is used to delete duplicate lines? uniq, often used with sort ; sort file | uniq ; can be used to count the lines as well (-c)
What command is used to count words lines and characters in a file? wc file; can be used to could them individually as well.
What command is used to copy a file, and what are some important options? cp source destination ; -f= force, -i= prompt before overwrite, -p= preserve ownership + permissions, -r or -R= recursive through directories
What command is used to find files on your computer? find [path] ; -name [pattern]; -perm [mode]; -size [#]; -gid [GID#] or -group [name]; uid = same as gid; -maxdepth [levels]; 0 for maxlevels is only the path directory
What command is used to make a directory, what option for a directory tree? mkdir ; -p= lets you make more than one at a time
What command is used to move a file, and what are important options? mv source destination ; -f= force, -i=ask before overwrite, no recursion, preserving automatic
What command is used to display files in a director, what are some important options? ls ; -l= long, -a= all, -d= directory, -i= inode, --color= add color, -R= recursive
What command is used to delete files? rm; -f= force, -i= prompt, -r or -R= recursive
What command is used to delete directories? rmdir; -p for parents; rm -rf normally better option
What command is used to modify timestamps or create an empty file? touch; 3 timestamps = mod, inode change, access, default is current time for access and mod
What is the command usage for tar? tar file path(s)
What option for tar is used for making a compressed zipped file? tar -czf file /home/user/file1 /home/user/file2 ; c= create, z= gzip (j=bzip2), f= file (ie not a tape drive)
What option for tar is used for extracting a file? tar -xf file /home/user/ ; x= extract, f= file
What option for tar is used for listing files in a tar file? tar -tvf file ; t= list, v= verbose, f= file
What is the command for making a cpio archive? source (often from a find command) | cpio -o > file ; o= create
What is the command for extracting a cpio archive? cpio -id < file ; i= extract, d= directories (if there is a tree), this extracts to current working directory
What is the command for listing files in a cpio archive? cpio -ivt < file ; v= verbose, t= list, i= extract (but not really)
What is the command for imaging a CD-ROM or backing up a filesystem that Linux cannot understand. dd if=inputfile of=ouputfile ; entire partition copied including empty space ; also used to make empty files of an exact space
What are the file types in linux? -= file, d= dir, l= link, p= pipe, s= socket, b= block device, c= character drvice
What command is used to compress a file? gzip or bzip2, -c to gzip keeps the original file, adds .gz to compressed.
What command is used to uncompress a file? gunzip or bzip2, -d to bzip2 to decompress, -c to gzip keeps the original file
What are the special file globbing characters? *= any number, ?= 1 char, [] range or specific match of chars, {} matches names or globs inside like cp {*.doc, *.pdf} . or echo {1..9}
How do you redirect stdout and stderr to the same file? &> file
How do you set a file to be used for stdin and stdout? <>
How can you use the output of one command as an argument of another?fg touch "newfile$(date)" ; makes a file called newfileMon Mar 17...
How can you send the output of a command to both the stdout as well as a file? tee command; ls | tee file ; sends output of ls command to a file and the screen
What is the purpose of xargs? takes arguments and passes them to another command. eg: find . -maxdepth 1 -name "*.jpg" | xargs tar czf jpeg.tgz ; this command finds jpg files passes it to xargs which run the tar command on them to make an archive
How would you run a find command in the background? add an '&' to the end of the command line, eg sleep 50 &
What command checks for the jobs running in the background? jobs ; also tells if jobs have finished running
What command lists running processes in the current shell? ps (-f= full information, l= long (shows nice))
What command lists all running processes? ps -e = standard or ax = BSD
What kind of signal does the standard kill command send, and what is the default destination of it? standard kill is -term, sends to a PID by default ; not all programs terminate on -term signal
What is the most powerful form of kill? kill -kill PID
What command will kill a process by name? killall; eg: killall -s 9 -u cdtt bash ; -s 9 = SIGKILL, -u = user; last argument is a name of process to kill
How can you run a job to continue to run even if the user logs out? nohup ; eg: nohup sleep 5000 ; output automatically send to nohup.out
What command can you use to check how long a system has been running, how busy it's been? uptime, or top
What command can you use to display amount of free and used memory in the system? free (-m shows in megabytes), or top
What is displayed at the top of the top command? How to control? memory (m), uptime (l) tasks (t)
What does top command sort by default? CPU %, you can use F in interactive mode to change, f can choose which things to display
What is the default priority of a job? Default with nice = 10, default without nice = 0
How can you use nice to set a higher priority? nice --10 find... ; negative values have higher priority
What is the priority values available for processes? Priority = -20 to 19, negative has higher priority
How can you change the priority of a running process with ID 4556? renice -n -19 -p 4556
How can you verify the the priority value of a process? using the ps command with the -l options shows the NI or nice priority
What is the usage notation for a grep command? grep pattern file ; often used in a pipe find... | grep pattern
What regular expression indicates beginning of a line? End of a line? ^ = beginning, $ = end
What are some of the important regex character classes? [[:alnum:]], space, blank, digit, upper, lower, ascii, etc.
What is the difference between grep and egrep? egrep uses extended regular expressions (same as grep -e) like + (one of more occurence or previous item), ?(zero or one), | and () grouping
What is the difference between grep and fgrep? fgrep does not use regular or extended expressions which makes it lighter, faster program (grep -f) also easier to search for text with special characters
What are the three main modes of vi and how do you get into them? command: escape to get to command mode, ex: manipulates files, ':' to get into it, insert: i, a, and o, are ways to enter this mode, allows user to input text.
How can you search for text in vi? command mode: /string = next occurrence, ?string = previous occurrence
How can you navigate text in vi? arrow keys or hjkl, left, down, up, right
What is the difference with i a and o in vi? i= before character, a= after character, o= insert new line underneath and enter insert mode.
What does 'c' do in vi? delete then enter insert, cc= line, cw=all text in word starting from character
What does 'd' do in vi? delete, dd= line, dw=all text in word starting from character
What does 'p' and 'P' do in vi? p= paste after highlighted, P= paste before highlighted
What does 'y' do in vi? y= yank text, yw= yank word (from highlighted), yy= yank line, can paste with p or P after (like copy not cut)
How can you save the file in vi? ZZ= save and quit, :w!= overwrite, :x= save and quit
How can you quit editing in vi? :q , :q! (if changes have been made)
If you made many changes to a file in vi how can you go back to original file contents? :e! , or :q! and reload
What command do you use to set up partitions? What are the important commands to it? fdisk; p= print table, n= create new, d= delete a partition, q= quit no save, w= write and quit
What is the difference between ext2fs, ext3fs, and ext4fs? ext2fs= old + reliable; ext3fs= same as 2 with journaling enabled; ext4fs= allows for disks over 32TB and files over 2TB with some improved performance
What is XFS? Silicon Graphics, high-performing, journaling, file system. Parallel I/O.
What is ReiserFS? First journaling file system on linux. No quota support. Ext3 sorta replaced it. The dude behind the name murdered his wife FYI (psycho).
What is VFAT? Extension to FAT file system to allow for long file names.
What command is used to make a filesystem? Important options? mkfs; -t= specify the type, -m= change reserved disk space allocated to root
What commands are used to make a swap filesystem? mkswap /dev/partition ; swapon /dev/partition; to permanently set it on must have it set up in /etc/fstab
Before running maintenance tools on a filesystem, what should be done? unmount the filesystem
What is the difference between du and df commands? du= disk usage on directories, recursively; df= disk usage on filesystem
How can you check inode usage info on a filesystem? df -i [specific device optional]
What command for checking consistency of a file system is generally run automatically at boot time? How is it triggered? fsck ; triggered by either inconsistent state (crash or power loss) or after a certain number of times that it is mounted
What filesystem feature helps prevent inconsistencies? Journaling
What program would be run by fsck to check for problems on a ext2fs filesystem? e2fsck
Which utility of e2fsprogs is used to creating ext2, ext3, and ext4 filesystems? mke2fs
What is the RAM-based file system specially designed for debugging purposes, interactive tool debugfs exists as a simple way for kernel developers to make information available to user space
What command is used to print superblock and block group information? Useful options? dumpe2fs ; -h turns off the group descriptors
Which XFS filesystem command is similar to dumpe2fs? xfs_info ; prints XFS file system information
What XFS filesystem tool is used to copy XFS file system metadata to a file xfs_metadump ; should be performed on unmounted, read-only or suspended file systems otherwise corrupted inconsistent data.
What XFS filesystem tool is used for debugging? xfs_db
What command is used to change many of the settings that dumpe2fs shows? What useful options? tune2fs ; -l= lists, acts like dumpe2fs just displays info
What command is used to mount a filesystem in linux? Syntax and useful command options? mount [options] device mountpoint ; mount -t ext3 /dev/sda1 /home ; -a= mounts ones listed in /etc/fstab ; -r= read only ; -t= specify type but normally auto detects ; -L or -U = by label or UUID ; -o= many options
What are some of the important -o options to mount command? defaults = defaults used; auto (or noauto)= mount at boot time and with -a; user (or nouser)= users allowed to mount; owner= if owner allowed to mount; remount= change options without unmount
What command is used to unmount a filesystem in linux? Syntax and useful command options? umount dir|device ; -a= mounted devices listed in /etc/mtab are unmounted; -f= force useful with network shares; -r= if can't unmount make read only
What file stores information on devices to mount at boot up? /etc/fstab
What file stores information on devices successfully mounted? /etc/mtab
What is the syntax in the file /etc/fstab? Device (/dev/sda1) \\ mount-point (/home) \\ filesystem (ext3) \\ option (defaults) \\ dump (0=nothing or 1=backup) \\ fsck (0=nothing >0= fsck check priority)
What is the purpose of the /media directory? Directory for mounting files systems on removable media like CD-ROM drives, floppy disks, and Zip drives.
What might be an alternative directory to /media? /mnt
What would the /etc/fstab entry look like for a user mountable usb? /dev/sda1 /media/cdrom auto users,noauto 0 0 ; users= allows users to mount, noauto= don't mount at startup
What are the requirements to setting up a disk quota? kernel + filesystem support, quota package installed, fstab entry of usrquota or grpquota
What command is used to verify and update quota information quotacheck
What command is used to display quota information for a specific user? group? filesystem? USER= quota user | repquota -u user ; GROUP= -g group option to both ; FILESYSTEM= quota -f /dev/sda1 | repquota /dev/sda1
What command is used to set a quota for a specific user? Useful options? edquota user ; -t= set grace period, -g= set for group ; opens text editor to change the settings
What aspects can a quota control? inode + block limits, soft limit (warning grace period), hard limit (cannot user more data)
What command is used to set a quota for a group? edquota -g group ; opens text editor to change the settings
What is the difference between repquota and quota? Very similar commands but quota defaults to user checking and repquota defaults to filesystem
What is the purpose of quotaon command? opposite of quotaoff, turns quotas on (again) for a filesystem; -v= verbose; -u= user quota; -g= group quota; without -gu will default to only do users (or just groups with -g)
What command is used to change permissions on a file or directory? Important options? chmod [options] (664 | u=rw,g=rw,o=r) filename ; -R= recursive, -v= verbose, -c=changes (sorta like verbose)
What is the purpose of the Sticky Bit? Protects files from being deleted by people who do not own them. Indicated by a ‘t’ in the world executable bit position. 1 in octal.
What is the purpose of Set User ID(SUID)? Used with executable files to set the program to run with the permission of whoever owns the file instead of the user running the file. Indicated by an ‘S’ in owner execute bit, 4 octal
What is the purpose of Set Group ID(SGID)? ): used with executable files to set the program to run with the permission of the group of the file instead of the user's group. Indicated by an ‘S’ in group execute bit, 2 octal
What command is used to change the owner and group of a file? chown [option] owner:group file; -R= recursive, -v= verbose, -c= changes (like verbose but changes only)
What command is used to change only the group of a file? chgrp [option] group file; -R= recursive, -v= verbose, -c= changes (like verbose but changes only)
How does the umask work? umask value takes the default octal of files (666) and directories (777) and removes (not by simple subtraction). so umask of 0012 on a file (666) will come out with 664 permission.
How do you set and check umask value? umask [new octal value] ; without the octal value it just displays current value
What command is used to make hard and soft links (symbolic)? ln [options] source destination ; -s= symbolic
How can you identify a symbolic link? ls -l will show an 'l' in the file type field as well as show the actual link in the name portion
How can you identify a hard link? This is difficult, you need to match the inode number, one way is with: find . -inum NUM or with ls -i to show the inode numbers
What is the FHS? Filesystem Hierarchy Standard, based off older standard (FSSTND) which sets the main directories and how they should be used (like /home /var /tmp /opt)
What command is used to find files on your computer using a database? locate filename ; more simple than find, only locates names by looking at a database but its very fast
What command is used to manually update the database which locate command uses? updatedb
What is the config file used for updatedb? /etc/updatedb.conf , sets up filesystems, directories and paths to skip placing into the locate database
What is the difference between whereis, which and type commands? whereis= search in specific directories for programs, which= search the path for first match, type= says how a command will be interpreted (/bin/ls or alias?) -a will show all of them
Created by: Datheral
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards