Setl MCQ
Setl MCQ
!! Sponsor and integrate open-source projects into the community-driven Fedora project.!
"#Develop specific integration tools only available in Red Hat distributions.
$#Participate in upstream projects.
%#Repackage and re-license community products.!
3. Which two statements describe the benefits of Linux? (Choose two)
1. Which term describes the interpreter that executes commands typed as strings?
1. Which command is used to return to the current user's home directory, assuming the current
working directory is /tmp and their home directory is /home/user?
!! cd "! cd .. #! cd * $! cd/home
2. Which command displays the absolute path name of the current location?
!! cd "! pwd #! ls - $! ls -d
3. Which command will always return you to the working directory used prior to the current
working directory?
!! cd - "! cd -p #! cd ~ $! cd ..
4. Which command will always change the working directory up two levels from the current
location?
&>/dev/null
!! >file 2>file2 "! &>/dev/null #! 2>file $! &>file
6. Which answer sends output to both the screen and a file at the same time?
1. Which item represents a number that identifies the user at the most fundamental level?
2. Which state represents a process that has released all of its resources except its PID?
3. Which process does a parent use to duplicate to create a new child process?
4. Which state represents a process that is sleeping until some condition is met?
!! /var/log/maillog
"#/var/log/boot.log
$#/var/log/messages
%#/var/log/secure
2. Which log file stores syslog messages related to security and authentication operations in the
system?
!! /var/log/maillog
"#/var/log/boot.log
$#/var/log/messages
%#/var/log/secure
3. Which service sorts and organize ssyslog messages into files in /var/log?
!! /sys/kernel/debug
"#/var/log/journal
$#/run/log/journal
%#/var/log
5. Which file stores syslog messages related to the mail server?
!! /var/log/lastlog
"#/var/log/maillog
$#/var/log/tallylog
%#/var/log/boot.log
6. Which file stores syslog messages related to the scheduled jobs?
!! /var/log/cron
"#/var/log/tallylog
$#/var/log/spooler
%#/var/log/secure
7. What file stores console messages related to system startup?
!! /var/log/cron
"#/var/log/tallylog
$#/var/log/boot.log
%#/var/log/secure
Þ Summary – Chapter 1:
- Open source software is software with source code that anyone can freely use, study, modify, and share.
- A Linux distribution is an installable operating system constructed from a Linux kernel and supporting
user programs and libraries.
- Red Hat participates in supporting and contributing code to open source projects, sponsors and integrates
project software into community-driven distributions, and stabilizes the software to offer it as supported
enterprise-ready products.
- Red Hat Enterprise Linux is Red Hat's open source, enterprise-ready, commercially-supported Linux
distribution.
Þ Summary – Chapter 2:
- The Bash shell is a command interpreter that prompts interactive users to specify Linux commands.
- Many commands have a --help option that displays a usage message or screen.
- Using workspaces makes it easier to organize multiple application windows.
- The Activities button located at the upper-left corner of the top bar provides an overview mode that helps
a user organize windows and start applications.
- The file command scans the beginning of a file's contents and displays what type it is.
- The head and tail commands display the beginning and end of a file, respectively.
- You can use Tab completion to complete file names when typing them as arguments to commands.
Þ Summary – Chapter 3:
- Files on a Linux system are organized into a single inverted tree of directories, known as a file-system
hierarchy.
- Absolute paths start with a / and specify the location of a file in the file-system hierarchy.
- Relative paths do not start with a / and specify the location of a file relative to the current working
directory.
- Five key commands are used to manage files: mkdir, rmdir, cp, mv, and rm.
- Hard links and soft links are different ways to have multiple file names point to the same data.
- The Bash shell provides pattern matching, expansion, and substitution features to help you efficiently
run commands.
Þ Summary – Chapter 5:
- Running programs, or processes, have three standard communication channels, standard input,
standard output, and standard error.
- You can use I/O redirection to read standard input from a file or write the output or errors from a process
to a file.
- Pipelines can be used to connect standard output from one process to standard input of another process,
and can be used to format output or build complex commands.
- You should know how to use at least one command-line text editor, and Vim is generally installed.
- Shell variables can help you run commands and are unique to a particular shell session.
- Environment variables can help you configure the behavior of the shell or the processes it starts.
Þ Summary – Chapter 6:
- There are three main types of user account: the superuser, system users, and regular users.
- A user must have a primary group and may be a member of one or more supplementary groups.
- The three critical files containing user and group information are /etc/passwd, /etc/group, and
/etc/shadow.
- The su and sudo commands can be used to run commands as the superuser.
- The useradd, usermod, and userdel commands can be used to manage users.
- The groupadd, groupmod, and groupdel commands can be used to manage groups.
- The chage command can be used to configure and view password expiration settings for users.
Þ Summary – Chapter 7:
- Files have three categories to which permissions apply. A file is owned by a user, a single group, and
other users. The most specific permission applies. User permissions override group permissions and
group permissions override other permissions.
- The ls command with the -l option expands the file listing to include both the file permissions and
ownership.
- The chmod command changes file permissions from the command line. There are two methods to
represent permissions, symbolic (letters) and numeric (digits).
- The chown command changes file ownership. The -R option recursively changes the ownership of a
directory tree.
- The umask command without arguments displays the current umask value of the shell. Every process
on the system has a umask. The default umask values for Bash are defined in the /etc/profile and
/etc/bashrc files.
Þ Summary – Chapter 8:
- A process is a running instance of an executable program. Processes are assigned a state, which can be
running, sleeping, stopped, or zombie. The ps command is used to list processes.
- Each terminal is its own session and can have foreground process and independent background
processes. The jobs command displays processes within a terminal session.
- A signal is a software interrupt that reports events to an executing program. The kill, pkill, and killall
commands use signals to control processes.
- Load average is an estimate of how busy the system is. To display load average values, you can use the
top, uptime, or w command.
Þ Summary – Chapter 9:
- systemd provides a method for activating system resources, server daemons, and other processes, both
at boot time and on a running system.
- Use the systemctl to start, stop, reload, enable, and disable services.
- Use the systemctl status command to determine the status of system daemons and network services
started by systemd.
- The systemctl list-dependencies command lists all service units upon which a specific service unit depends.
- systemd can mask a service unit so that it does not run even to satisfy dependencies.
Þ Summary – Chapter 10:
- The ssh command allows users to access remote systems securely using the SSH protocol.
- A client system stores remote servers' identities in ~/.ssh/known_hosts and
/etc/ssh/ssh_known_hosts.
- SSH supports both password-based and key-based authentication.
- The ssh-keygen command generates an SSH key pair for authentication. The ssh-copy-id command
exports the public key to remote systems.
- The sshd service implements the SSH protocol on Red Hat Enterprise Linux systems.
- It is a recommended practice to configure sshd to disable remote logins as root and to require
- public key authentication rather than password-based authentication.
Location Purpose
/usr Installed software, shared libraries, include files, and read-only program data.
Important subdirectories include:
- /usr/bin: User commands.
- /usr/sbin: System administration commands.
- /usr/local: Locally customized software.
/etc Configuration files specific to this system.
/var Variable data specific to this system that should persist between boots. Files
that dynamically change, such as databases, cache directories, log files,
printer-spooled documents, and website content may be found under /var.
/run Runtime data for processes started since the last boot. This includes process ID
files and lock files, among other things. The contents of this directory are
recreated on reboot. This directory consolidates /var/run and /var/lock from
earlier versions of Red Hat Enterprise Linux.
/home Home directories are where regular users store their personal data and
configuration files.
/root Home directory for the administrative superuser, root.
/tmp A world-writable space for temporary files. Files which have not been
accessed, changed, or modified for 10 days are deleted from this directory
automatically. Another temporary directory exists, /var/tmp, in which files
that have not been accessed, changed, or modified in more than 30 days are
deleted automatically.
/boot Files needed in order to start the boot process.
/dev Contains special device files that are used by the system to access hardware.
/var/log/messages Most syslog messages are logged here. Exceptions include messages
related to authentication and email processing, scheduled job execution,
and those which are purely debugging- related.
/var/log/secure Syslog messages related to security and authentication events.
/var/log/maillog Any one character in the enclosed class (between the square brackets).
/var/log/cron Any one character not in the enclosed class.
/var/log/boot.log Any one character not in the enclosed class.
Khalid Shawki
[email protected]