Open Source Software
Скачать 1.28 Mb.
|
Shells, Bash, and the Command Line1.Question 1 Which of the following commands would add newbin, a directory in your home directory, to the PATH (Select all answers that apply)? PATH=$PATH:$HOME/newbin PATH=$HOME/newbin:$PATH 2.Question 2 To make an environment variable (VAR) effective for only one command (foobar), you should do: VAR=value ./foobar 3.Question 3 Which of the following expressions will give the correct mathematical result (7) for x = 10 (Select all answers that apply)? $ echo $(($x - 3 )) $ echo $(expr $x - 3) 4.Question 4 Which commands will get both the normal and error outputs of prog into afile? foo > file 2>&1 foo >& file 5.Question 5 Which of the following commands has the correct syntax for specifying an alias? alias doitall="make clean; make all; evince output.pdf" Filesystem Layout, Partitions, Paths, and Links1.Question 1 Which of the following pseudo-directories are empty when the system is not running (Select all answers that apply)? /proc /dev /sys 2.Question 2 Which of the following statements describes the best practice? The current directory should not be placed in the path 3.Question 3 If file does not exist, which command will produce an error? ln file file2 4.Question 4 Which command will list the partition information on the first hard disk and then exit? fdisk -l /dev/sda 5.Question 5 Which directory trees usually have frequently changing data, and would not be desirable on a partition that is more static? Select all answers that apply. /tmp /var /home Week 3 System Initialization1.Question 1 What is the proper order of system initialization stages on most x86-based systems? BIOS -> GRUB -> init (PID 1) 2.Question 2 Which files need to be in the /boot directory for the system to boot up (select all that apply)? initramfs vmlinuz 3.Question 3 Using GRUB lets you (Select all correct answers): (All are correct) Choose various options for booting up the system Choose which Linux kernel to user for boot Choose between operating systems or different Linux distributions 4.Question 4 Select the order in which the following system initialization methods were introduced: SysVinit -> Upstart -> systemd 5.Question 5 Which runlevel is multiple user with no graphical desktop? 3 Memory1.Question 1 A rather complete picture of memory usage can be gotten by viewing the following pseudofile: /proc/meminfo 2.Question 2 Select all true statements: Memory used directly by the Linux kernel is never swapped out. Using swap space lets the system pretend it has more memory than it physically has. There is no uniform prescription for how much swap space to use. 3.Question 3 Which statement(s) are correct? The pthreads library enables multithreaded applications to be written just once for many different operating systems. A process may contain many threads. 4.Question 4 The OOM KIller Tries to keep the system running by killing processes which are using more memory than can be supplied 5.Question 5 Which of the following are utilities used to work with swap space? swapon swapoff mkswap |