1/169
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Files are broken into fixed sized units called ...
... blocks.
... pages.
... breaks.
... partitions.
... pointers.
…blocks
In Linux, the system administrator’s home directory is stored under ...
/home
/sbin
/bin
/root
/sys
/root
The surface of a hard disk is broken into which types of regions?
blocks (only)
tracks and sectors
tracks and segments
sectors and blocks
blocks and partitions
tracks and sectors
You can separately mount and unmount each individual partition. true or false
true
The zip and tar programs can be used to create ...
... archives.
... copies of files.
... directories.
... lossy compressed files.
... partitions.
... archives.
Under which Linux top-level directory would you find most of the configuration files?
/bin
/usr
/var
/home
/etc
/etc
With file blocks distributed across the file system instead of being stored in consecutive disk blocks, accessing the file requires traversing the blocks creating what one might call a ...
... partition.
... breadcrumb trail.
... directory/subdirectory structure.
... track trail.
... linked list.
... linked list.
File name extensions are primarily used ...
All of the above
... by the operating system to know what software to use to open the file.
... by the system administrator to ensure the file is properly protected.
... by the user to know whether the file can be executed or not.
... by the user to know how recent the file is.
... by the operating system to know what software to use to open the file.
In DOS, which of the following symbols is used to denote a directory in a path?
C:
~
/
\
..
\
Which of the following tasks would not be possible for a system administrator to do on the file system?
Establish disk quotas
Encrypt portions of the file system
All of the above are possible.
Add remote storage to be accessed over network
Mount and unmount specific partitions
All of the above are possible.
If a hard disk contains 4 platters, how many read/write heads will the hard disk contain?
4
8
2
16
1
8
In a linked list, to reach the 5th block, how many links do you have to follow?
2
1
0
4
5
4
The /proc top level directory is different from most other Linux top level directories because it ...
... is writeable by both root and all users.
... never changes so it never has to be backed up.
None of the above: there is nothing different about /proc from other top-level directories.
... is only used if your computer has multiple processors.
... is not stored on disk but instead stored in memory.
... is not stored on disk but instead stored in memory.
In order to determine which directory you are currently in, which commands would you use respectively in Windows and Linux?
nothing in Windows, and pwd in Linux
ls in Windows and pwd in Linux
pwd in both
where in Windows and pwd in Linux
pwd in Windows and nothing in Linux
nothing in Windows, and pwd in Linux
In Linux, you have one inode for every file and directory in your file system.
true or false
true
In Linux, you would expect to find many of the system administrator programs stored under ...
/var
/root
/bin
/boot
/sbin
/sbin
The time it takes the read/write head to move across the disk to the proper track is called ...
... transfer time.
... traversal time.
... seek time.
... access time.
... rotational delay (or rotational latency).
... seek time.
. To create a directory, both Linux and DOS use mkdir.
true or false
true
In both Windows and Linux, partitions are denoted by using different letters as in C: and D:.
true or false
false
In Linux, a soft link is called ...
a symbolic link
a shortcut icon
a pointer
None of the above: Linux does not have soft links, it only has hard links.
an alias
a symbolic link
Which of the following Linux commands is like the DOS command dir?
dir
rm
car
mv
ls
ls
In Linux, devices like the disk drives, USB drives, network devices and monitor are treated as files. These “files” are stored under which directory?
/sbin
/mnt
/dev
/bin
/etc
/dev
A hard link in a file system points at the file while a soft link points at a file’s directory entry.
true or false
true
In Linux, every top-level directory is located on its own partition whereas in Windows, all of the top-level directories are on the same partition.
true or false
false
The file system for Windows and Linux are “shapes” like a ...
... building.
... window.
... tree.
... well.
... disk.
... tree.
Disk access time is slower than memory access time.
true or false
true
We view the file system from a physical perspective while the operating system manipulates it from a logical perspective.
true or false
false
Under which Linux top-level directory would you find the user directories?
/usr
/etc
/var
/home
/bin
/home
Which of the following files stores the currently mounted file systems (partitions) in Linux?
/etc/mtab
/etc/motd
/etc/fstab
/etc/sudoers
/etc/resolv.conf
/etc/mtab
Which of the following files stores user account information?
/etc/shadow
/etc/passwd
/etc/sudoers
/etc/shell
/etc/users
/etc/passwd
In file compression, lossy compression ...
... increases the file size by uncompression portions of it.
... reduces the file size but requires uncompression the file before its contents can be viewed/used.
... increases the file size by inserting additional data.
... reduces the file size by eliminating unnecessary content.
... reduces the file size by discarding some of the data.
... reduces the file size by discarding some of the data.
All files have names although the extension is not required. true or false
true
User passwords are not actually stored in the /etc/passwd file.
true or false
true
Mounting ...
... converts a soft link to a hard link.
... makes a partition available.
... alters a file’s location in the file system.
... moves a directory from one location to another.
... removes a partition.
... makes a partition available.
In Windows, the Programs top level directory stores applications software. In Linux, the equivalent directory is ...
/var
/home
/usr
/etc
/bin
/usr
In Linux, you can add or delete users and add or delete groups using the same GUI tool.
true or false
true
Assume the file foo.txt has permissions of –rwxrw-r--. After issuing the instruction chmod g-w foo.txt, which of the following is not true?
The file is still readable by everyone.
The owner is the only person who can write to the file.
The owner of the file still has full access to the file (rwx).
All of the above are true.
The world (other) has no access to the file at all.
The world (other) has no access to the file at all.
In Linux, user accounts created for software will often have which of the following specified?
a comment field that says “software, not a user”
a shell of /sbin/nologin
a home directory of /root
no home directory at all
None of the above: software do not have user accounts
a shell of /sbin/nologin
In Linux, two users can never share the same user ID or the same private group.
true or false
false
The Linux instruction chown foxr:cit371 foo.txt changes foo.txt’s ...
... owner.
... name.
... group.
... permissions.
... group and owner.
... group and owner.
If a file’s long listing has permissions of lrwxrwxrwx, what can we conclude?
The file has no writing permissions for users other than the owner.
The file is actually a directory.
The permissions need to be changed.
The file is actually a symbolic link.
None of the above.
The file is actually a symbolic link.
The Linux instruction passwd -x 30 zappaf will ...
... lock zappaf out of his account now and delete his account in 30 days if his account is not unlocked.
... lock zappaf out of his account in 30 days.
... require that zappaf change his password within 30 days.
... warn zappaf to change his password within 30 days.
... change zappaf’s password in 30 days.
... require that zappaf change his password within 30 days.
In Linux, users all have ID numbers but groups do not.
true or false
false
The root account in Linux has access to all resources including every file owned by every user.
true or false
true
A strong password requires all of the following except ...
... it should be generated randomly.
... it should contain a combination of alphabetic and non-alphabetic characters.
A strong password should include all of the above.
... it should be changed at least every 2-3 months.
... it should be at least 8 characters long.
... it should be generated randomly.
In Linux, directories need to be ______ for a user to cd into them.
readable
writable
None of the above, directories do not need any special permissions to be cd’ed into.
executable
executable
The file afile has permissions of 764. The instruction chmod g-w,o-r will alter its permissions to be ...
744
640
644
740
760
740
In Linux, when creating a user account for some user, username, by default, the user’s directory will be placed in ...
/etc/username
username
/home/username
root/username
Users/username
/home/username
When a new user is created in Linux, an entry of user account information is automatically placed into ...
/home/shadow
/etc/passwd
/home/username where username is the account name of the new user
/etc/user
/home/passwd
/etc/passwd
In Linux, you might use the useradd instruction to create numerous new accounts over the GUI User Manager tool because ...
... you do not have to enter an initial password using useradd.
All of the above are reasons.
... you can write a script to automate the process.
... you can use command line editing to easily modify each new submission over filling out the GUI over and over.
... you can specify additional groups more easily from the command line.
All of the above are reasons.
The process of identifying a user through a username and password is known as ...
... authentication.
... ermisisons.
... acknowledgement.
... security.
... protection.
... authentication.
In the Linux useradd instruction, the -u option allows you to ...
... change the user's username.
... change the default user ID.
... change the default shell.
... unlock the user's account.
... change the default home directory.
... change the default user ID.
In the Linux useradd instruction, the –m option specifies ...
... to use the default user ID.
... to create a private (primary) group whose name is the same as the username.
... to use the efault directory location and shell.
... all of the above.
... to create a home directory.
... to create a home directory.
Which Linux file stores user passwords in an encrypted form?
etc/shadow
/home/passwd
/etc/group
/usr/passwd
/etc/passwd
etc/shadow
While it is possible to switch to another user without logging out in Windows using Switch user, it is not possible to do so in Linux. true or false
false
By default, the next user added to a Linux system is given the next sequential user ID from the previously entered user.
true or false
true
What operating system task is access control lists used for?
protection
resource management
file management
memory management
security
protection
In order to discover your password, someone might call you on the phone and try to trick you into divulging it to them, for instance by acting as someone from your organization’s IT group. This is often called ...
... ip spoofing.
... denal of service.
... social engineering.
... dimpster diving.
... password cracking.
... social engineering.
The main purpose of a group in both Linux and Windows is to permit ...
... a means of password sharing.
... to permit secure access to network resources like printers and file servers.
... another level of permissions over just yourself and the world.
All of the above
... a classification used for accounting purposes.
... to permit secure access to network resources like printers and file servers.
The earliest version of Windows that required user accounts was Windows 3.1.
true or false
false
In the Linux useradd instruction, which option would you use to add the user to a number of existing groups?
-a
-g
-o
-s
-G
-G
When using the useradd instruction in Linux, you are required to specify the user’s username and password. true or false
false
If you are zappaf, you have read but not execute access to this file.
true or false
true
In Linux, the -f parameter used in the passwd command does which of the following?
It locks the user’s account.
It forces the user to change their password the next time they log in.
It unlocks the user’s account.
It warns the user to change their password soon.
It forces the user to change their password immediately.
It forces the user to change their password the next time they log in.
Accounts are not just set up for human users.
true or false
true
Assume Q=15.
The instruction Q=$Q+1 will result in Q storing ...
15+1
15
None: you cannot store a number in a bash variable.
Q+1
16
15+1
Your PS1 variable is set to “\d $” What will your prompt display?
the user’s username followed by a space and $
a $
the current working directory followed by a space and $
the current date followed by a space and $
the current date and time followed by a space and $
the current date followed by a space and $
One use of an alias is to fix common typos, for instance alias mr=rm so that if you are prone to typing mr, it will be fixed as rm. true or false
true
Assume the current directory has the following files:
file1.txt file2.txt file3 file4 files5.txt
How many files would be listed in the instruction ls file*.txt ?
0
1
All 5 of them.
3
2
3
Consider the following history list:
ps
ps aux
ls -l *
ls /etc/*.conf
cd ..
cp foo.txt ~foxr
The notation !17 repeats which of the following instructions?
None of the above: !17 will yield an error message.
cd ..
ls -l *
ls /etc/*.conf
cp foo.txt ~foxr
ls -l *
Consider the following history list:
ps
ps aux
ls -l *
ls /etc/*.conf
cd ..
cp foo.txt ~foxr
To re-execute the last instruction (the cp instruction) in the history list, which of the following would not do this?
control+n <enter>
All of the above would re-execute the last instruction.
!! <enter>
!20 <enter>
!c <enter>
control+n <enter>
While it is possible to switch to another user without logging out in Windows using Switch user, it is not possible to do so in Linux. true or false
false
From the command line, if you type control+k and then control+y, you wind up having the exact same thing on the command line than you did before the keystrokes.true or false
true
Which of the following environment variables defines your prompt?
PWD
PS1
USER
P1
PROMPT
PS1
What does the following instruction do?
cat foo1.txt foo2.txt > foo3.txt
It displays the contents of the 3 files foo1.txt, foo2.txt, foo3.txt in your window.
It determines if the number of lines of the first two files is greater than the number of lines in the third file.
It displays the contents of the 2 files foo1.txt and foo2.txt in your window.
It takes the contents of file1.txt and file2.txt and copies them into the file foo3.txt
It runs the program foo1.txt and foo2.txt, sending the output to foo3.txt
It takes the contents of file1.txt and file2.txt and copies them into the file foo3.txt
As a system administrator, you want all users to have rm redefined to the safer rm -i through an alias. The best place to put this alias is into each user’s .bashrc file. true or false
false
Consider the following history list:
ps
ps aux
ls –l *
ls /etc/*.conf
cd ..
cp foo.txt ~foxr
→ Neither !p nor !ps would repeat instruction 15.
true or false
true
Assume the current directory has the following files:
carpenters cartoons creative_stuff.txt creatures customers.txt
If you type cat ca<tab>, what will happen?
The bash interpreter will list carpenters and cartoons.
The bash interpreter will list all of five of the files.
The bash interpreter will beep at you.
The bash interpreter will complete the filename as cat cartoons.
The bash interpreter will complete the filename as cat carpenters.
The bash interpreter will beep at you.
How many different directories is referenced in the instruction ls /home/a/{b,c}}?
4
2
1
0
3
2
Consider the following history list:
ps
ps aux
ls -l *
ls /etc/*.conf
cd ..
cp foo.txt ~foxr
Pressing control+p three times followed by the enter key repeats which of the following instructions?
ls /etc/*.conf
cp foo.txt ~foxr
ls -l *
cd ..
None of the above: control+p moves you forward in the history list, not backward.
ls /etc/*.conf
If you wanted to explore how to use some Linux command, say mount, your best option is to use ...
man mount
mount -help
help mount
apropos mount
options mount
man mount
If you want to output the message “today’s date is” followed by the result of the date command, which of the following Linux commands will accomplish this?
echo today’s date is date
echo “today’s date is $date”
echo “today’s date is date
”
echo “today’s date is date”
echo today’s date is $date
echo “today’s date is date
”
Assume the current directory has the following files:
file1.txt file2.txt file3 file4 files5.txt
Indicate how many files would be listed in the instruction ls file
2
1
all 5 of them
3
0
0
Linux shell runs in an interpreted environment. What does “interpreted” mean?
Instructions, when entered, are converted to executable form and executed.
None of the above: the Linux shell is not an interpreted environment.
Instructions, when entered, are executed without need for conversion.
Instructions entered can be written in different languages.
Instructions can be entered by either command line or GUI.
Instructions, when entered, are converted to executable form and executed.
What does !! do?
It executes the last instruction again.
It completes whatever filename is being entered.
It causes an error.
It executes the last instruction in the history list that contained a !
It executes the first instruction in the history list again.
It executes the last instruction again.
With command line editing, what does control+p do?
It recalls the next instruction in the history list.
It moves the cursor to the beginning of the line.
It recalls the previous instruction in the history list.
It moves the cursor to the previous word.
It moves the cursor to the previous character.
It recalls the previous instruction in the history list.
Assume you are user dukeg, which of the following directories would be equivalent to ~zappaf?
usr/zappaf
/home/zappaf
/home/dukeg
/zappaf
This would yield an error for anyone other than zappaf.
usr/zappaf
The .profile script is executed whenever a new bash shell is started.
true or false
true
Assume the current directory has the following files:
file1.txt file2.txt file3 file4 files5.txt
How many files would be listed in the instruction ls * ?
2
3
4
0
All of them
all of them
The bash interpreter will perform many steps in executing your instruction. Redirections will occur at what point?
After expansions take place
After arithmetic operations are performed
After aliases are replaced
After the words and operators are parsed
As the very last part of the operation
After arithmetic operations are performed
You do not have to place the items to be output in an echo statement in either “” or ‘’.
true or false
true
What is the difference between > and >>?
They do the same thing.
> redirects output while >> redirects input.
> redirects input from file, >> redirects input from keyboard.
> redirects input while >> redirects output.
> stores the output to a file, >> appends the output to a file.
> stores the output to a file, >> appends the output to a file.
For command line editing, control+b moves you back one character and escape+b moves you back one word (to the previous space or punctuation mark).
true or false
true
Consider the following history list:
ps
ps aux
ls -l *
ls /etc/*.conf
cd ..
cp foo.txt ~foxr
The notation !cd repeats which of the following instructions?
none of the above: !c will yield an error message.
ls /etc/*.conf
cp foo.txt ~foxr
ls –l *
cd ..
cd ..
The history list retains 10 instructions at a time.true or false
false
It is better to place your aliases in your .bashrc or .bash_profile script than to define them at the command line.
true or false
true
Consider the following history list:
ps
ps aux
ls -l *
ls /etc/*.conf
cd ..
cp foo.txt ~foxr
You would use which of the following sequences of keystrokes to delete the first entry on the line and then submit the instruction?
control+a, control+k, <enter>
control+a, control+d, <enter>
control+a, escape+d, <enter>
control+e, control+d, <enter>
control+d, escape+d, <enter>
control+a, escape+d, <enter>
The following alias has an error:
alias lsl=ls -l
What error is it?
None of the above: there are no errors in the alias.
You cannot define an alias with a word that contains a Linux command (e.g., you could not use lsl since ls is a Linux command but you could use lal since la is not a Linux command).
The right hand side, ls –l, needs to be placed inside of single quote marks.
You need to insert blank spaces around the =.
The word alias should be all capital letters (ALIAS).
The right hand side, ls –l, needs to be placed inside of single quote marks.
What does the PATH environment variable store?
Your current working directory
Your home directory
All of your working directories since the session started
The last current working directory prior to the current one
All of the directories to test for any command entered
All of the directories to test for any command entered
What does << do in the instruction cat << foo
It redirects the output of the program foo to go to the program cat.
It redirects input for cat to come from keyboard, ending with the string foo.
It redirects the output from cat to go to the file foo.
It redirects the output from the program cat to go to the program foo.
It redirects input for cat to come from the file foo.
It redirects input for cat to come from keyboard, ending with the string foo.