What is a program that passes commands from the user to the operating system?
A shell
What does a user use to typically interact with a shell?
A terminal emulator
What does the part of the Bash shell prompt look like before the :?
username@machinename
When you are NOT the superuser, what character is present after ~/projects in a Bash shell (projects is a directory)?
$
When you are the superuser, what character is present after ~/projects in a Bash shell (projects is a directory)?
#
Commands which are built into the shell itself are called:
Shell builtins
What is the command (two commands with |) to view the command history list in Bash?
history | less
What key do you use with Bash to take advantage of completion?
Tab
What is the Bash command to show the current amount of free space on the disk drives?
df
What is the Bash command to show the total amount of free memory?
free
What is the Bash command to end the terminal session and close the terminal emulator window?
exit
What is the Bash command to display the current working directory?
pwd
What is the option to ls to change the output to the long format version?
-l
What is the option to ls to sort the files in the output by last time modified?
-t
What is the option to ls to show hidden files?
-a
What is the option to ls to show hidden files but skip . and ..?
-A
What is the option to ls to sort the files in the output by file size?
-S
What is the option to ls to reverse the order of the files in the output?
-r
What is the option to ls that is used in combination with long format to show file size in a more human readable way?
-h
When using the ls command with the -l option, what does it mean when the first character in the output is -?
It is a file
What using the ls command with the -l option, what does it mean when the character in the output is d?
It is a directory
What using the ls command with the -l option, what does it mean when the first character in the output is l?
It is a symbolic link
What using the ls command with the -l option, the first set of three characters describe the access rights of who?
The file's owner
What using the ls command with the -l option, the second group of three characters describes the access rights of the?
The file's group owner
When using the ls command with the -l option, the last set of three characters describe the access rights of the what?
The world
What does this ls -l output for a file mean?
-rwx------
It is a file where the owner has read, write, and execution access and nobody else has any access
What does this ls -l output for a file mean?
-rwxr-xr--
It is a file where the owner has full access, the group cannot edit it, and the world can only read it
When using the ls command with the -l option, what follows the 10 file permissions characters?
drwxr-xr-x 3 regoky regoky 4.0K Apr 9 10:47 db
The number of hard links
When using the ls command with the -l option, what follows the number of hard links?
drwxr-xr-x 3 regoky regoky 4.0K Apr 9 10:47 db
The file's owner's username
When using the ls command with the -l option, what follows the file owner's username?
drwxr-xr-x 3 regoky regoky 4.0K Apr 9 10:47 db
The file's group owner's name
When using the ls command with the -l option, what follows the file's group owner's name?
drwxr-xr-x 3 regoky regoky 4.0K Apr 9 10:47 db
The file's size
When using the ls command with the -l option, what follows the file size?
drwxr-xr-x 3 regoky regoky 4.0K Apr 9 10:47 db
The date/time last modified
When using the ls command with the -l option, what follows the date/time last modified?
drwxr-xr-x 3 regoky regoky 4.0K Apr 9 10:47 db
The file's name
When using the ls command with the -l option, what might appear after the filename?
If it is a symlink, an arrow and a second filename
When using the cd command, what does . mean?
The current working directory
When using the cd command, what does .. mean?
The parent directory
What does the cd command do when given no arguments?
Changes the current working directory to the home directory
What can be omitted by default when using the cd command?
./
What Bash command can be used to output information about the type of a file?
file <filename>
The less command in Bash is an example of what kind of program?
Pager
What is the key to use to exit the less pager?
q
What is the Bash command to create a new directory?
mkdir
What is the Bash command to copy a file or directory?
cp <filename1> <filename2>
What is the command in Bash to move (or rename) a file?
mv <filename1> <filename2>
What is the Bash command (that should be used carefully!) to delete files and directories?
rm
What is the command in Bash to create hard or symbolic links?
ln
What is the command in Bash to display an executable's location?
which
What does the alias command in Bash do when given no arguments?
Display the alias commands that are available in the environment
Are filenames in Linux case-sensitive or case-insensitive?
Case-sensitive
What are the only punctuation characters that should be used in Linux filenames?
periods, dashes, and underscores
Should filenames have spaces in Linux?
No
Is there a concept of file extensions in Linux?
No
Files that begin with a dot in Linux are?
Hidden
What is the standard that Linux filesystems generally follow, although there are differences between distributions?
The Linux Filesystem Hierarchy Standard
What is the term that somewhat means "placed" and is how storage devices are placed at specific places in a Linux system?
Mounted
How is the root directory in Linux denoted?
/
What is the directory in Linux for the Linux kernel, initial RAM disk image, and boot loader?
/boot
What is the directory in Linux for system wide configuration files?
/etc
What is the file in Linux for defining when the jobs will run?
/etc/crontab
What is the file in Linux which is a table of storage devices and mount points?
/etc/fstab
What is the file in Linux which defines the groups?
/etc/group
What is the file in Linux which defines the users' login names, uid, gid, home directories, and login shells?
/etc/passwd
What is the global configuration file in Linux for the environment that applies to all users?
/etc/profile
What is the file in Linux that has information about the users' passwords?
/etc/shadow
What is the directory in Linux that is where the home directories are located?
/home
What is the directory in Linux which is where shared libraries are stored?
/lib
What is the directory in Linux which has mount points for USB drives and other things which are mounted automatically when inserted?
/media
What is the directory in Linux which has mount points for removable devices that have been mounted manually?
/mnt
What is the directory where WSL mounts the Windows C: drive?
/mnt/c
What is the directory in Linux for optional things like commercial products?
/opt
What is the directory in Linux which is a virtual file system maintained by the kernel?
/proc
What is the directory in Linux which is the home directory for the root user?
/root
What is the directory in Linux which for system binaries and things generally reserved for the root user?
/sbin
What is the directory in Linux for temporary transient files?
/tmp
What is the directory in Linux for data that is likely to change?
/var
According to The Linux Command Line, what are the two places that programs send their output?
Standard output and standard error
According to The Linux Command Line, many programs take input from what (which is also linked to the keyboard)?
standard input
What special file in Linux acts as a "bit bucket" which accepts output (from I/O redirection for example) and does nothing with it?
/dev/null
What is the operator that can pipe the standard output of one command into the standard input of another command in Bash?
|
What is the command which sends the contents of a file to the standard output?
cat <filename>
What is the command to display the number of lines, words, and bytes in a file?
wc <filename>
echo *s is an example of what type of expansion?
Pathname expansion
echo ~ is an example of what type of expansion?
Tilde expansion
What is the character which is the escape character, and is also part of the notation of the control codes in ASCII?
\
The \n control code which is 10 is what in hexadecimal?
A
The \r control code which is 13 is what in hexadecimal?
D
What does the control code \r represent?
A carriage return
What is decimal 1 in binary using 3 bits?
001
What is %001 in decimal?
1
What is decimal 2 in binary using 3 bits?
010
What is %010 in decimal?
2
What is decimal 3 in binary using 3 bits?
011
What is %011 in decimal?
3
What is decimal 4 in binary using 3 bits?
100
What is %100 in decimal?
4
What is decimal 5 in binary using 3 bits?
101
What is %101 in decimal?
5
What is decimal 6 in binary using 3 bits?
110
What is %110 in decimal?
6
What is decimal 7 in binary using 3 bits?
111
What is %111 in decimal?
7
What is the command in Bash that outputs some information about your identity and groups?
id
What are the three access categories that access rights are defined in terms of with the Unix security model?
Read, write, and execution access
What refers to the first 10 characters of the ls -l command?
File attributes
What is the command which changes the permissions of a file or directory and takes the permissions argument as an octal number?
chmod
What users are able to change the permissions of a file with chmod?
The file's owner or the superuser
What are the file attributes of file called a.txt after this command is run by the file's owner?
chmod 755 a.txt
-rwxr-xr-x
What is the command used to start a shell as a different user?
su
What is the command which allows an ordinary user to execute commands as a different user (usually the superuser)?
sudo
What is the command which is used to change the owner and group owner of a file/directory in Linux (requires superuser privileges)?
chown
What is the Linux/Bash command to change your own password?
passwd
What is the program in Linux that runs a series of init scripts when the system starts and always has the process ID 1?
init
What is the command to show the processes related to the current terminal session?
ps
What is a useful group of options to pass to the ps command In Linux/Bash that seems to be easy to remember?
aux
(Note there is no leading dash)
Previous card
First card
Random order
Next card