Lesson 6 Quiz Flashcards

1
Q

Use this command to change to a directory, pushing the current directory onto the stack.

a) cd
b) popd
c) pushd
d) mkdir

A

c) pushd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

You need to redirect BOTH standard output and standard error to myfile.

a) > myfile 2> myfile
b) myfile
c) 2>myfile >myfile
d) > myfile 2>&1

A

d) > myfile 2>&1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

This predefined environment variable shows the path searched when executing commands.

a) path
b) Path
c) SEARCH_PATH
d) PATH

A

d) PATH

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When you login to a bash shell the following file is read FIRST.

a) ~/.bash_profile
b) /etc/profile.d
c) ~/bash_logout
d) /etc/profile

A

d) /etc/profile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Related to the X Window System, this is the GUI program that often runs on a remote machine, but displays its output on another machine.

a) POSIX
b) $DISPLAY
c) X Client
d) X Server

A

c) X Client

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

You need to redirect standard error to myfile.

a)&raquo_space; myfile
b) 2> myfile
c) < myfile
d) > myfile

A

b) 2> myfile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Select ALL items that are TRUE releated to POSIX.

a) POSIX is a CompTIA certification exam.
b) POSIX = Portable Opreating System Interface
c) bash is not compliant with POSIX nor is it headed in the direction to be compliant with POSIX.
d) POSIX is an IEEE Standard (POSIX 1002.3)

A

b) POSIX = Portable Opreating System Interface

d) POSIX is an IEEE Standard (POSIX 1002.3)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Releated to /bin/bash, what does bash mean?

a) bash = BAsic SHell
b) bash = Basic Advanced SHell
c) bash = Basic All-purpose SHell
d) bash = Bourne Again SHell

A

d) bash = Bourne Again SHell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You are looking at a text file that begins with the first line as follows:
#!/bin/bash
What does this ttell you about the remaining lines in the file?
a) The file is a BASH (Bourne Again Shell) script
b) This is a normal text file.
c) The file is a Perl Script.
d) The file is a Python Script.

A

a) The file is a BASH (Bourne Again Shell) script

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The user located at /home/student wants to edit a file so that everytime they login they can set user-specific environment variables, etc. PATH=$PATH:$HOME/bin. What file should they edit?

a) /etc/.bash_profile
b) ~/.bash_profile
c) /etc/profile.d
d) /etc/profile

A

b) ~/.bash_profile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Select ALL items that are TRUE related to X Window System.

a) The X Window System was created at MIT in 1984
b) Microsoft Windows is built upon the X Window System.
c) The X Window sytem includes a network protocol
d) Nearly every GNU/Linux distribution includes the X Window System.

A

a) The X Window System was created at MIT in 1984
c) The X Window sytem includes a network protocol
d) Nearly every GNU/Linux distribution includes the X Window System.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Related to Linux shells, select ALL items below that are TRUE.

a) Linux systems offer many shell options, including bash, dash (Debian Shell), ksh (Korne Shell) and csh (C-shell)
b) On Fedora/RHEL, the /bin/sh is a symbolic link to /bin/bash.
c) Linux systems provide the single /bin/bash shell.
d) The /bin/bash shell is the most commonly used shell on Linux.

A

a) Linux systems offer many shell options, including bash, dash (Debian Shell), ksh (Korne Shell) and csh (C-shell)
b) On Fedora/RHEL, the /bin/sh is a symbolic link to /bin/bash.
d) The /bin/bash shell is the most commonly used shell on Linux.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

You need to redirect standard input from myfile.

a)&raquo_space; myfile
b) > myfile
c) < myfile
d) 2> myfile

A

c) < myfile
(remember input points left, output points right
, error use 2>)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Use this enviroment variable to set your secondary shell prompt.

a) PROMPT
b) SECONDARY
c) PS2
d) PS1

A

c) PS2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Related to the X Window System, this manages the graphics display, keyboard, and mouse.

a) X Server
b) POSIX
c) $DISPLAY
d) X Client

A

a) X Server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

You need to append standard output to myfile.

a)&raquo_space; myfile
b) 2> myfile
c) > myfile
d) < myfile

A

a) &raquo_space; myfile

17
Q

Enter the name of the command you can use to display your command-line history.

A

history

18
Q

Use this environment variable to set your primary shell prompt.

a) PROMPT
b) PRIMARY
c) PS1
d) PS2

A

c) PS1

19
Q

You need to redirect standard output to myfile.

a)&raquo_space; myfile
b) < myfile
c) > myfile
d) 2> myfile

A

c) > myfile

(remember input points left, output points right
, error use 2>, append&raquo_space;)

20
Q

Use this key to put a foreground job into the background.

a) Ctrl+\
b) Ctrl+c
c) Ctrl+z
d) Ctrl+d

A

c) Ctrl+z