CNIT 340 Exam 1

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/262

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

263 Terms

1
New cards

what is unix?

a collection of related operating systems

2
New cards

what are the two major divisions of unix?

BSD & SysV/SVR4

3
New cards

what kind of operating system is UNIX typically?

command line only

4
New cards

what is the structure of a UNIX command?

command -flags operand

5
New cards

what is the superuser account in UNIX?

root

6
New cards

what is the file and command that controls who can run programs as root

/etc/sudoers; visudo

7
New cards

T/F: is it possible to create a root equivalent account?

false

8
New cards

how does one interact with the system?

via the command line parser

9
New cards

what are some things the command line parser can do?

manage processes, manage files

10
New cards

what are the two ways commands can be entered?

manually and via shell scripting

11
New cards

login shell

program that provides the user's command line prompt when they log into the system

12
New cards

where is the login shell specified?

/etc/passwd

13
New cards

where are the startup scripts the login shell generally stored?

user's home directory

14
New cards

interactive shell

a non-login shell into which the user enters commands

15
New cards

non-interactive shell

usually contains a script and inherits environment variables from the parent shell

16
New cards

C shell (csh)

/bin/csh; uses C language syntax for scripting

17
New cards

Korn shell (ksh)

/bin/ksh; introduced command line history and tab completion

18
New cards

BASH

/bin/bash; standard scripting shell for most Linux distributions

19
New cards

what is everything managed as in UNIX?

a file under a single filesystem (root "/")

20
New cards

what is the only hard mount point in UNIX?

the root "/"

21
New cards

/bin directory

executable files requied for basic operations

22
New cards

/dev directory

placeholders for devices

23
New cards

/etc directory

configuration information and files

24
New cards

/sbin directory

system binaries

25
New cards

/lost+found directory

where lost files are put

26
New cards

/proc directory

holds the placeholders for running processes

27
New cards

/usr directory

contains installed applications used by all users

28
New cards

/home directory

contains the home directories for each user

29
New cards

/var directory

contains log files, spooling, and cache

30
New cards

/tmp directory

hold temporary files

31
New cards

what must happen before any filesystem (including CD-ROM) can be used?

it must be mounted to the root filesystem

32
New cards

mount point

directory used as an anchor point or place holder

33
New cards

where must filesystems be mounted over?

an existing directory/mount point

34
New cards

what is the command to mount a filesystem

mount

35
New cards

what is the command to unmount a filesystem

umount

36
New cards

what is the file that contains a list of all the filesystems to automatically mount?

/etc/fstab

37
New cards

what are the two partitions that every UNIX installation requires?

/ and swap

38
New cards

what is done during the installation filesystem configuration?

configuring disks for access, defining volumes, creating partitions and assigning filesystem to partitions

39
New cards

what partition should always be created separately?

/var

40
New cards

ls command

list the files characteristics and information

41
New cards

mv command

move a file or rename a file

42
New cards

rm command

remove a file

43
New cards

-f flag

force; prevents the system from asking confirmation before deleting

44
New cards

-r flag

recursive; affects all underlying files and directories

45
New cards

what are the three owners of every file/directory, in what order?

user, group, everyone

46
New cards

what is the command to view ownership?

ls -l

47
New cards

what is the command the change the user or group ownership?

chown

48
New cards

what is the command that will only change the group ownership?

chgrp

49
New cards

what are the three basic permissions?

read (4), write (2), execute (1)

50
New cards

what is the command to change file permissions?

chmod

51
New cards

what is the SUID bit?

a file always executes as the file's owner; value of 4, lower 's' when set and has read perm, upper 'S' when set and does not have read perm

52
New cards

what is the SGID bit?

any files will be executed as the owning group; any files created in the directory will have group ownership set to the parent directory's group; value of 2

53
New cards

what is the sticky bit?

only the owner/root of a file/directory can delete or rename the file; value of 1

54
New cards

link

a pointer to another file or directory

55
New cards

symbolic/soft links

a pointer to another file, if deleted the target remins

56
New cards

hard link

a direct link between the file, once the last reference to the inode is deleted, the file is no longer accessible

57
New cards

what link can cross the file system?

soft link

58
New cards

what link can link between directories?

soft link

59
New cards

what link has different inode number and file permissions?

soft link

60
New cards

what link will not have its permissions updated?

soft link

61
New cards

what link only contains the path of the original ifle?

soft link

62
New cards

what link cannot cross the file system boundaries?

hard link

63
New cards

what link cannot link between directories?

hard link

64
New cards

what link has the same inode number and permissions?

hard link

65
New cards

what link will have its permissions updated?

hard link

66
New cards

what link has the actual contents of the original file?

hard link

67
New cards

pipe ("|")

sends the output of a program as the input for another program

68
New cards

redirect (">")

redirect the output of a program to something other than stdout

69
New cards

grep command

used to search for a string; can use on file or whatever is piped into it

70
New cards

grep command structure (file)

grep

71
New cards

grap command structure (pipe)

| grep

72
New cards

find command

used to find files

73
New cards

find command structure

find -type -maxdepth -name

74
New cards

dircmp command

compares directories

75
New cards

ps command

lists all currently running processes

76
New cards

ps command structure

ps -aux OR ps aux

77
New cards

kill command

used to kill a currently running process

78
New cards

-9 flag

terminate with extreme prejudice

79
New cards

kill command structure

kill -9

80
New cards

command to reboot machine

shutdown -r now

81
New cards

command to halt/shutdown machine

shutdown -h 5

82
New cards

what are the two basic approaches to distributing UNIX software?

compile from source and pre-compiled packages

83
New cards

what are the steps to configure from source code?

./configure; make; make install

84
New cards

why compile from source code?

most flexible and will work on most UNIX distributions and hardware platforms, but have to deal with dependancies manually

85
New cards

why install software using packages?

automatic updates and don't have to worry about dependancies

86
New cards

what is a tarball

a file that contains multiple files; UNIX equivalent of a ZIP file

87
New cards

what is usually also done to tarballs?

compressed with gzip or bzip

88
New cards

what is the command to expand a tarball

tar -xvf

89
New cards

what is the command to expand a compressed tarball?

tar -zxvf

90
New cards

what is the ports collection?

automate downloading and compiling source code and handles dependencies, common on BSD, middleground between packages and compiling from source

91
New cards

where is hardware support done?

in the kernel

92
New cards

how does one add support for new hardware?

add to the kernel and recompile

93
New cards

what are the benefits of modular kernels

dynamically link new kernel modules to the kernel at run-time; faster, simpler, reduces system instability, more security issues

94
New cards

commands for interacting with kernel

depmod, modprobe, insmod

95
New cards

building kernel process

installer kernel sources/compilers, modify system config, build new kernel, install and test new kernel

96
New cards

UNIX startup process

BIOS -> boot device > boot loader > kernel > init/systemd

97
New cards

boot loader task

loads kernel into memory

98
New cards

kernel task

initialize hardware and modules

99
New cards

init/systemd task

check file system integrity, mount disks, initialize network and network daemons

100
New cards

fsck command

check the integrity of file systems