Please choose the best answer. More than one answer might be true, but choose the one that is best.

Similar documents
Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Linux & Shell Programming 2014

Unix Introduction to UNIX

Lab Working with Linux Command Line

Lab 3a Using the vi editor

Introduction to the UNIX command line

Introduction: What is Unix?

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Chapter-3. Introduction to Unix: Fundamental Commands

CST8177 Linux II. Linux Boot Process

Linux Essentials Objectives Topics:

Roll No. :... Invigilator's Signature : UNIX AND SHELL PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

Computer Systems and Architecture

System Administration. Startup Process

Introduction to Linux

client X11 Linux workstation

Linux Nuts and Bolts

Introduction to Linux

A Brief Introduction to Unix

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

Course 55187B Linux System Administration

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Introduction to Linux

User & Group Administration

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

Computer Systems and Architecture

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

The landscape. File hierarchy overview. A tree structure of directories The directory tree is standardized. But varies slightly among distributions

Users Manual. OP5 System 2.4. OP5 AB. Page 1 of 6

Set 1 MCQ Which command is used to sort the lines of data in a file in reverse order A) sort B) sh C) st D) sort -r

RH133. Red Hat Linux System Administration

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Linux Systems Administration Shell Scripting Basics. Mike Jager Network Startup Resource Center

CS370 Operating Systems

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Presented by Bill Genske Gary Jackson

Files

The Unix Shell & Shell Scripts

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

CHAPTER 1 UNIX FOR NONPROGRAMMERS

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Unix System Architecture, File System, and Shell Commands

Stop all processes and then reboot - same as above startx. Log in as superuser from current login exit

Exam Linux-Praxis - 1 ( From )

Course 144 Supplementary Materials. UNIX Fundamentals

Introduction to Unix: Fundamental Commands

TestOut Linux Pro - English 4.0.x OBJECTIVE MAPPING: CompTIA Linux+ LX0-103

CENG 334 Computer Networks. Laboratory I Linux Tutorial

CS197U: A Hands on Introduction to Unix

Introduction to Linux

Certification. System Initialization and Services

ITEC451 Network Design & Analysis Laboratory Guide: Appendix

Introduction to Linux Workshop 1

Prerequisites: General computing knowledge and experience. No prior knowledge with Linux is required. Supported Distributions:

EE516: Embedded Software Project 1. Setting Up Environment for Projects

CST Algonquin College 2

Introduction to Linux Basics

Unix Handouts. Shantanu N Kulkarni

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Linux Essentials. Smith, Roderick W. Table of Contents ISBN-13: Introduction xvii. Chapter 1 Selecting an Operating System 1

Introduction to Unix and Linux. Workshop 1: Directories and Files

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

Computer Architecture Lab 1 (Starting with Linux)

Disks, Filesystems 1

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

At course completion. Overview. Audience profile. Course Outline. : 55187B: Linux System Administration. Course Outline :: 55187B::

User Guide Version 2.0

Unix Basics. UNIX Introduction. Lecture 14

CISC 220 fall 2011, set 1: Linux basics

5/8/2012. Creating and Changing Directories Chapter 7

Please note that CNE 216 is a brand new course that has never been taught on the George campus; it will be taught for the first time in the fall of

. Fill in the Blank: A directory named mydir has just been... Points:10. Add Question Success: 64 questions added as a copy.

The Linux IPL Procedure

RHCE BOOT CAMP. The Boot Process. Wednesday, November 28, 12

CS Fundamentals of Programming II Fall Very Basic UNIX

Linux Shell Script. J. K. Mandal

User accounts and authorization

Perl and R Scripting for Biologists

Disks, Filesystems, Booting Todd Kelley CST8177 Todd Kelley 1

"Charting the Course... MOC B: Linux System Administration. Course Summary

Comptia LX0-101 Exam Questions & Answers

Introduction To Linux. Rob Thomas - ACRC

Lecture # 2 Introduction to UNIX (Part 2)

Introduction to the Linux Command Line

Linux Kung Fu. Ross Ventresca UBNetDef, Fall 2017

Introduction to UNIX Command Line

System Programming. Introduction to Unix

Welcome to Linux. Lecture 1.1

Basic Linux Command Line Interface Guide

1. Open VirtualBox and start your linux VM. Boot the machine and log in with the user account you created in Lab #1. Open the Terminal application.

1. What statistic did the wc -l command show? (do man wc to get the answer) A. The number of bytes B. The number of lines C. The number of words

Linux+ Guide to Linux Certification, Third Edition. Chapter 2 Linux Installation and Usage

Linux Command Line Primer. By: Scott Marshall

CSE 390a Lecture 2. Exploring Shell Commands, Streams, and Redirection

LPIC-1 System Administrator

Transcription:

Introduction to Linux and Unix - endterm Please choose the best answer. More than one answer might be true, but choose the one that is best. SYSTEM STARTUP 1. A hard disk master boot record is located: a) in the disk s first partition, only b) in each of the disk s partitions c) on the disk outside all its partitions d) outside the disk 2. The GRUB boot loader can be used to a) control which operating system to call at boot time b) pass parameters to the called operating system c) both a and b d) neither a nor b 3. The first process launched when linux boots is normally a) login b) sysinit c) init d) vmlinuz 4. runlevels reflect: a) degrees of authorization for access to system resources b) stages in the boot process from cold power off to fully functional prompt c) different, particular choices of services to run 5. A command that can be used to control which programs are automatically run as part of the boot process is a) grub b) grep c) rpm d) chkconfig 6. The role of the directory /etc/rc.d/init.d is to hold a) the binary executable program files for the base runlevel s services b) scripts that call the binary executables for the base runlevel s services c) the binary executable program files for all runlevels services d) scripts that call the binary executables for all runlevels services UTILITIES 7. The command to delete a file is: a) del b) rem c) mv d) rm

8. The command to copy a file is: a) copy b) cp c) mv d) dup 9. The command to rename a file is: a) ren b) mv c) nameto d) alias 10. The script command can a) keep a log of your shell interaction b) remove a file c) rename a file d) all of the above 11. The command to see a list of current users of the system is a) ls b) logged c) who d) pwd 12. The command to display the name of the current directory is a) ls b) logged c) who d) pwd 13. The command to display the content (eg, filenames) in the current directory is a) ls b) logged c) who d) pwd 14. The wc command gives a) a word count b) a line count c) a character count d) all of the above 15. The command to append a word count to the end of a file is a) wc filename cat b) wc filename > filename c) wc filename >> filename 16. The command to make a directory is a) MKDIR b) MD c) md

17. The command to copy the contents of a directory to the current directory is a) copy directoryname/* b) cp directory/* c) cp directory/*. 18. The command to copy a file to the parent directory is a) copy filename b) cp filename c) cp filename. 19. The command to display to screen all files whose names begin with "lab" would be a) cat lab* b) tac lab c) cat lab& TEXT EDITING 20. Of vi s 3 command modes, listed below, one of them is reached from both of the other two by the same keystroke. Which one? a) command mode b) edit mode c) last-line mode THE SHELL 21. Which one of the following is not a shell feature? a) backgrounding b) permissions c) variables d) scripting 22. The command who cat sort prints a sorted list of logged-in users on the monitor. Choose the best, technical answer from the following. a) the output from who is identically the input to the monitor b) the input to cat is identically the output from sort c) the output from who is identically the input to cat d) the inputs to sort and cat are both the direct output from who e) who has no input and sort has no output 23. Typing which of the following is identically equivalent to typing echo v* a) echo a e i o u b) echo v? c) echo va vi vo d) print v* e) none of the above 24. On a linux system, the shell is a) the first process to run b) the executor of all other processes c) both a and b d) neither a nor b

THE X WINDOW SYSTEM 25. The diagram in Figure 1 represents a) 2 X servers and 4 X clients b) 2 X servers and 2 X clients c) 3 X servers and 4 X clients d) 1 X server and 3 X clients e) none of the above Figure 1. 26. Running an X client without running an X server a) is step one of the normal GUI startup procedure b) doesn t work c) requires the client to operate at low resolution d) requires the client to switch to character mode 27. in X Windows, a window manager is a) a client b) a server c) a desktop d) a shell script

SHELL SCRIPTING 28. This shell script waits until a user logs in, then reports the login: until who grep "$1" > /dev/null do sleep 5 done echo "***** $1 has just logged in *****" the user whose login it reports is a) the first one to login after the script starts b) the first one to have logged in since a fresh post-backup utmp file was generated c) the first one in /etc/passwd d) the first one named on the command line 29. This shell loop executes how many times? for foo in all users do echo $foo done a) 4 b) 3 c) 2 d) 1 e) cannot be determined solely from information in the code

PROCESSES 30. Here is informational screen output on a machine: When this program runs a) child asks Am I child? then parent asks Am I parent? in that order b) child asks Am I child? and parent asks Am I parent? in unpredictable order c) parent asks Am I child? then child asks Am I parent? in that order d) parent asks Am I child? and child asks Am I parent? in unpredictable order 31. See the code below. It has 2 lines of code that print text lines to the screen. When run: a) upper line appears 1 time, lower line appears 1 time b) upper line appears 1 time, lower line appears 2 times c) upper line appears 2 times, lower line appears 1 time d) upper line appears 2 times, lower line appears 2 times #include <stdio.h> main() { printf("\nhow many times do you see this line?\n"); fork(); printf("how about this one?\n"); } 32. A distinction between the fork() and exec() system calls is that: a) fork only creates a process, exec both creates and runs it b) fork runs a process, exec does not c) exec creates a process, fork does not d) fork creates a process, exec does not

33. It is often desirable for a parent process that spawns a child to suspend further execution until the child terminates. Example: a shell should not yet re-prompt the user for a second command till a first one finishes. The system functions that cooperatively accomplish this behavior are: a) wait() in the parent and exit() in the child b) fork() in the parent and term() in the child c) exec() in the parent and exit() in the child d) exit() in the parent and wait() in the child 34. The /proc filesystem is a) a mechanism for secondary, indirect access to disk b) a RAM disk feature built into linux to speed up file-intensive operations c) a selective access mechanism to kernel memory that happens to use the same interface for user access as files d) a special region of memory whose content persists across reboots 35. Here is informational screen output on a machine: The numbers that appear in the above ls output represent a) processes b) memory c) users d) time

FILESYSTEM 36. 3 components exist on disk for a file in an ext2 (linux) filesystem: its data, its inode, and its name. Given file A and file B, one of A s components can reside within one of B s. a) A s data cat reside within B s data b) A s inode can reside within B s data c) A s inode can reside within B s inode d) A s name can reside within B s data e) A s name can reside within B s inode 37. File permission string "rwxr-xr--" has three r's for a) reading at different times of day b) reading by different users c) reading from different terminals d) reading by different shells

Here is informational screen output on a machine: 38. User Socrates can write to file grades a) T b) F 39. User Aristotle can write to file assignments a) T b) F 40. User plato can write to file salaries a) T b) F 41. User roy can read file assignments a) T b) F 42. Given the file /home/joe/myfile: --w----rwx 1 joe pppusers 10 May 6 14:55 myfile if user joe attempts cat myfile and echo hello >> myfile: a) cat will succeed and echo will fail b) cat will fail and echo will succeed c) both will fail d) both will succeed

43. Here is informational screen output on a machine: Above, tom attempted to shut the system down but it didn't shut down, because a) tom ran shutdown but it refused to shut down b) shutdown never actually ran, because nobody but root can run it c) shutdown never actually ran, because tom lacked adequate permissions d) tom ran shutdown but it failed with an unexpected error COMPILING - OPEN-SOURCE INSTALLATION MODEL 44. Two broad, contrasting approaches to installing software are: a) tar versus source b) diff versus patch c) package versus rpm d) tar versus rpm 45. A step in the standard recipe for installing from a tarball is to read the: a) Makefile file b) README file c) INSTALLME file d) CONFIG file 46. A virtue of rpm installing is: a) fast downloading b) local machine customization c) multiple compression options d) easy uninstalling 47. A detriment of rpm installing (without yum), compared to installing with yum, is a) slower operation b) repositories are all local c) no dependency resolution d) difficult uninstalling

48. The man system of local documentation is divided into sections for a) commands and functions b) character and graphical commands c) high and low level users d) commands, system calls, file formats, and a few other categories 49. Regular user passwords are stored in file a) /etc/password b) /etc/shadow c) /etc/passwd d) /etc/group 50. The file that controls whether linux boots into character or graphical mode is a) /boot/grub/grub.conf b) /etc/passwd c) /boot/x.conf d) /etc/inittab