compTIA Linux Flashcards
A system administrator adds addr show eth0 to the ip command to only display address information for the first ethernet port. Determine the correct terminology for the syntax used by the administrator when addr is used.
A.Primary command
B.Subcommand
C.Command option
D.Command argument
Subcommand
Many Linux commands have subcommands that allow the system administrator to specify specific information. These commands use a different syntax than standard command syntax, with a space between the primary command and subcommand.
A primary command is a basic command given to the shell. The standard command syntax relies on the three primary components of the Bash syntax, including commands, options, and arguments.
An option is a command modifier that slightly modifies how the system will execute a command.
The object on which the command acts is an argument. For example, when using a command to delete a file, the argument is the name of the file to remove.
A Linux system administrator working for a security firm performs analysis on a collection of files. The administrator wants to keep track of the work by updating the timestamps on each file throughout the analysis. Recommend a basic Linux command that will update a file’s timestamp.
A.touch
B.locate
C.mkdir
D.tree
The touch command creates a file without any content, making it ideal for creating the empty configuration file. The touch command will also update the timestamp when used on an existing file so that the administrator can use the same command for both tasks.
The locate command is a quick method to locate specific files or subdirectories in a file system. This command can quickly find files.
The mkdir (make directory) command allows users to create a new directory. Using arguments, it can also set permissions.
The tree command in both Linux and Unix systems is a recursive directory listing program. Without arguments, it returns a depth-indented list of files in the current directory.
A Bash terminal accepts user input and processes that input according to a predefined syntax before providing output to the user. Bash falls under which category of software or standard?
Using the command-line interface (CLI) for administration is dependent on command shells and interpreters that accept user input, process that input according to a pre-defined syntax, and return the output.
A graphical user interface (GUI) is a form of user interface that allows users to interact with electronic devices via visual indicators, such as graphical icons.
Text editors, such as Vim and Nano, are essential for Linux administration, particularly when it comes to headless Linux servers lacking a GUI. Both text editors run in the command line and often edit configuration files.
In Linux operating systems, everything is a file, including directories. There is a degree of standardization to Linux directories, including common ones, such as the home directory.
A systems administrator in charge of a Rocks Cluster Linux-powered high-performance computing (HPC) cluster updates several custom configuration files used by the proprietary application software. The cluster runs updates using custom scripts that update files based on the timestamps of the last time they were accessed. If they are older than a few days, cached configuration files with last-known-good settings will replace them. The administrator does not want to lose the settings that the system has used for a few days. So, the administrator updates the timestamp on the first configuration file to mark it as current, so the update script does not update it. Then, the administrator needs to create a second file to add configuration settings to a new service for the cluster’s main application. Only root users can create new files in the configuration directory, but standard users can fill in the configuration if the file already exists. Determine what command-line interface (CLI) command the administrator can use to perform operations on both files.
The touch command creates a file without any content, making it ideal for creating the empty configuration file. The touch command will also update the timestamp when used on an existing file so that the administrator can use the same command for both tasks.
The tree command in both Linux and Unix systems is a recursive directory listing program. Without arguments, it returns a depth-indented list of files in the current directory.
The mkdir (make directory) command allows users to create a new directory. Using arguments, it can also set permissions.
The locate command is a quick method to locate specific files or subdirectories in a file system. This command can quickly find files.
A Linux system administrator working for a cloud services company is double-checking the contents of several configuration files. Recommend a basic Linux command that the administrator might use to display the contents of a file. (Select all that apply.)
A.mkdir
B.touch
C.cat
D.less
The cat command displays the contents of a specified file on the screen. It is a quick way to view the contents of a file.
Administrators use the less command when the contents of a file are too large to fit on a single screen. This command only displays what can fit on the screen at one time.
The mkdir (make directory) command allows users to create a new directory. Using arguments, it can also set permissions.
The touch command creates a file without any content, making it ideal for creating the empty configuration file. The touch command also updates the timestamp when used on an existing file so that the administrator can use the same command for both tasks.
A systems administrator wants to create a new user account in the Debian system used by their employer. Recommend a command for creating a new user that will also prompt the administrator to set a password.
A.The adduser command
B.The useradd command
C.The passwd command
D.The who command