stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Mastering the terminal: The Bash History Flashcards | StudBud
Explore
/
Mastering the terminal: The Bash History
Mastering the terminal: The Bash History
68 terms
·
StudBud Administration
·
1 play
Imported from external platform
Flashcards
68 cards
F
Practice quiz
P
Host live
L
Questions
68
Answers
1
In a relative path a single dot represents the directory you’re in the double dot represents the parent directory
False
True
2
/bin
Executable files for essential system commands
Binary files containing system libraries
Configuration files for system utilities
Temporary files created by user applications
3
What is .bashrc in Ubuntu
Storing system-wide configuration settings
A script that’s been executed whenever you start a new shell session
Storing log files for Bash shell sessions
Storing system-wide configuration settings
4
Running ls without an argument will print the contents of the working directory
True
False
5
All files and directories appear under the root directory even if stored on different disk or partition
True
False
6
/boot
Temporary files used during the boot process
Files required for the operating system’s initial boot sequence
Essential binaries for system administration
System-wide configuration files
7
/bin
It stores binary files related to system administration tasks
It holds backup copies of important system configuration files.
It is a temporary directory for storing user-generated binaries.
Contains basic tools for copying and removing files and directories
8
What does the history command do?
Prints the system’s uptime and load average
Displays the contents of a specified file
Lists the history of commands executed in the current session
Searches for files and directories
9
The structure of Linux file system is hierarchical much like an upside tree where the root directory is at the base
True
False
10
What does Ctrl + G do in the bash history
Leaves the search history mode and clear the line
Opens the global history file for browsing.
Generates a new command prompt
Goes to the beginning of the command history
11
Finish the sentence: a file system is on a______________
Network routers
Computer monitor
A hard disk or storage device
Cloud server
12
What does !ping:p do?
It executes the “ping” command with predefined parameters.
prints the most recent command starting with “ping” without executing it
displays the current system’s network ping statistics.
It sends a ping request to the specified host.
13
What does pressing Ctrl + N do in the command history?
Opens a new terminal window.
Moves to the next line in the command history.
Retrieves the next command from the history and displays it for editing
Creates a new file in the current directory.
14
What does Echo “HISTCONTROL =ignore both” >> .bashrc do?
Allows you to save the variable setting as the default
Deletes the .bashrc file
Creates a new .bashrc file with the specified string.
Renames the .bashrc file to “HISTCONTROL=ignoreboth”.
15
What is /sys
access to kernel data structures and information about devices and drivers
It stores temporary system files used by various processes
It hosts user-specific files and settings for each user profile
It contains configuration files for system-wide settings
16
What does sudo -v do?
Validates the sudo user’s password without running a command
Verifies the version of the sudo utility installed on the system.
Views the current sudoers configuration file
Verifies the integrity of system files
17
When using the tree command what does the options -d do ?
Includes file size information in the tree output
Enables colorized output for better readability
Filters out hidden files and directories
Displays only directories in the tree structure
18
/mnt is like media but is not usually used
False
True
19
When the sudo command is ran its caches the credentials for 5 mins before needing the password again
False
True
20
What does the command passwd do?
It updates the user’s password in a Unix-like operating system.
It opens a text editor for editing system configuration files.
It displays the current date and time
It lists all the files in the current directory
21
What does the history - C do in the bash history
Displays the command history in reverse chronological order.
Clears the current terminal session’s command history
Copies the entire command history to a new file
Creates a backup of the command history file
22
What does FITS = file system hierarchy standard
True
False
23
What does: cat /proc/ cpuinfo do?
Lists all processes currently running in the system
Retrieves detailed information about system CPU specifications
Prints out the contents of a file named “cpuinfo” in the “proc” directory
Displays information about the current user’s CPU usage
24
What is a file
A type of computer software used for organizing documents
A collection of folders on a computer
A physical storage device used to store data
A group of data
25
What does the command cd do?
Copies files and directories from one location to another
Creates a new directory in the current location
Will take you to the directory you specify as an argument
Clears the contents of a file or directory
26
What does the variable HISTSIZE do?
Determines the number of commands remembered in the command history list
manages the number of commands stored in the history list during a session
Sets the maximum file size for log files
Specifies the size of the current terminal window
27
any file that starts with a dot is not hidden
True
False
28
You can temporarily login to root by running su and enter it the root password
True
False
29
In Linux There are two types of path what’s are they ?
Primary and Secondary
Static and Dynamic
Local and Remote
Absolute and Relative
30
/etc
Temporary files used by system processes
Essential system binaries
User-specific configuration files
System configuration files and directories
31
What does the command Echo do ?
Prints text or variables to the terminal
Displays the contents of a file
Copies files and directories
Prints the current working directory
32
What does pressing Ctrl + P do in the command history?
Retrieves the previous command from the history and displays it for editing
Prints the current directory path
Deletes the previous command from the history.
Opens the command history for browsing previous commands.
33
How do you run a command a certain number of lines back ?
Holding the Shift key while pressing the up arrow
Using the run keyword followed by the line number
Pressing Ctrl + L to refresh the terminal and go back
Utilizing the !-n command, where ‘n’ is the number of lines back
34
/Desktop (the directory) is written with a capital D
False
True
35
/lib
Executable files for system libraries
Temporary files used during system operation
Contains shared files used by different applications
Configuration files for system utilities
36
What does: cat/ proc /meminfo do?
Retrieves detailed information about system memory usage and statistics
Lists all processes currently running in the system
Prints out the contents of a file named “meminfo” in the “proc” directory
Displays information about the current user’s memory usage
37
File system
The software interface that manages and organizes data on a storage device.
The structure and logic rules used to manage files and their names
A hardware component used to store data on a computer
The process of compressing and archiving files for storage efficiency
38
What is an absolute path
A complete path starting from the root directory (/)
A path that includes only the filename without the directory structure
A path that starts from the user’s home directory
39
/sbin
Shared libraries for system utilities
Temporary storage for system logs
System-wide configuration files
Specialized binary files for system administration tasks
40
Finish the sentence, the number of commands that’s stored in the history file is controlled by _________
$HISTFILESIZE
$HISTORY_SIZE
$HIST_LIMIT
$HISTORY_LIMIT
41
What does HISTTIMEFORMAT do ?
Configures the date and time format for log files
Controls the display format of timestamps in the command history.
Configures the date and time format for log files
Sets the format for displaying the current system time.
42
What does the history -D plus the line number do in the bash history ex: history -D 107
Deletes the command at the specified line number from the history.
Moves the command at the specified line number to the beginning of history
Duplicates the command at the specified line number in the history
Displays the command at the specified line number in the history
43
/Var ex: cat/var/log / auth.log
It stores user-specific configuration files and settings
It provides access to kernel data structures and info about devices
It holds variable data files like logs, databases, and temporary files
It contains system binaries and essential commands
44
Finish the sentence, the bash shell stores in the user________.
Environment variables
Configuration file
Home directory
Profile
45
How do you run a specific conmand from the history by its number use…….
the execute keyword
the ! followed by the command number
How do you run a specific conmand from the history by its number use…….
the ! followed by the command number
46
What does the Ctrl + R do in the bash history
Refreshes the terminal window
Reverses the order of commands in the history.
Recall mode that searches for command you’ve already ran
Resumes the most recent suspended job.
47
/dev
Contains device files
Users home directory
System configuration files
Developments tools and libraries
48
What does user add do in Linux ex: sudo useraddd Jonn
Adds a new user account to the system
Adds a user to an existing group.
Modifies the password of an existing user.
Deletes a user account from the system
49
It’s prohibited to log directly into root on many distributions like Debian or Ubuntu
True
False
50
What are the main categories of users in n Linux?
Admin and Guest user
Root and Power user
System user and Standard user
Root user and non-privilege user
51
When using the tree command what does the options -f do ?
Forces the tree command to run without displaying file names
Filters out files based on specified criteria
Displays the full path for each file and directory
Formats the output of the tree command in a specific file format
52
/media
A system file used for managing system media settings
An acronym for “Multiple Editable Data Input/Output Area”
A directory typically used for mounting removable media devices
A command-line utility for managing multimedia files
53
What is .bashrc used for
It manages user permissions and access control.
It logs system events and errors.
It stores system-wide configuration settings
Customize the shell environment, set variables, define aliases config. Set.
54
Ifconfig is used to configure a network adapter or fdisk: used to manipulate disk partitions
False
True
55
Finish the sentence: When you run df- h you can see___________
Detailed information about system processes
Real-time system memory utilization
Disk usage statistics for all mounted file systems
The history of disk fragmentation
56
What does the ~ represent in the file system
It represents a temporary file.
It indicates a home directory for a user
It denotes a system directory.
It signifies a hidden file.
57
Which file serves as the storage location for a user’s command history in the terminal?
~/.bash_profile
~/.bash_history
~/.profile
~/.bashrc
58
What does sudo -k do?
Invalidate user cashed credentials
Kills the currently running sudo session
Sets the sudo password to “k”
Opens the sudoers configuration file for editing
59
What does the id command do ?
Prints out the logged in user and the group it belongs to
Initiates a system-wide disk check and repair procedure.
Displays information about the system’s current date and time.
Shows the current user’s login details
60
To see a list of any file or directory run ls and the directory as an argument,
False
True
61
On Linux everything is either a file or process, if something isn’t a file it’s a process
False
True
62
What is a path
The process ID of a running program
A unique location to a file or a directory in the file in the file system
The name of a program or command in the terminal
The IP address of a remote server
63
Which directory stores the configuration of any Linux systems ?
/sys
/bar
/etc
/tmp
64
What does pwd do in the Linux file system
Prints the full path of the current working directory
Lists all files and directories in the current directory
Prints out the current date and time
Displays the content of a specified file
65
What does groupadd do in Linux? Ex: sudo groupadd admin
Adds an existing user to a specified group
Modifies the permissions of a file or directory.
Creates a new user account.
Creates a new group on the system
66
FHS is maintained by Linus foundation
True
False
67
All user prompts end in a dollar sign and all root ends in a hash or pound sign #
False
True
68
What does -a option do?
Archives files
Adds executable permission to a file
Display all file plus all hidden files
Appends content to a file