08. Command Line Operations Flashcards
(123 cards)
The command line interface provides the following advantages:
- No GUI overhead is incurred.
- Virtually any and every task can be accomplished while sitting at the command line.
- You can implement scripts for often-used (or easy-to-forget) tasks and series of procedures.
- You can sign into remote machines anywhere on the Internet.
- You can initiate graphical applications directly from the command line instead of hunting through menus.
- While graphical tools may vary among Linux distributions, the command line interface does not.
A _______________ program emulates (simulates) a standalone terminal within a window on the desktop.
terminal emulator
available terminal programs include:
- xterm
- konsole (default on KDE)
- terminator
If you do not have the Applications menu, you will have to install the appropriate ____________ package and turn it on with gnome-tweaks.
gnome-shell-extension
Open terminal
- Applications > System Tools > Terminal or Applications > Utilities > Terminal.
- right-clicking anywhere on the desktop background and selecting Open in Terminal.
- Alt-F2 and type gnome-terminal.
There are some basic command line utilities that are used constantly:
- cat: used to type out a file (or combine files).
- head: used to show the first few lines of a file.
- tail: used to show the last few lines of a file.
- man: used to view documentation.
Note the use of the _____________ used to have one program take as input the output of another
pipe symbol (|)
Most input lines entered at the shell prompt have three basic elements:
- Command
- Options
- Arguments
The command is the ____________ or script you are executing. It may be followed by one or more options (or switches) that modify what the command may do
name of the program
(1)______________ usually start with one or two dashes, for example, -p or –print, in order to differentiate them from (2)______________
- Options
- Arguments
_____________ allows users to run programs using the security privileges of another user, generally root (superuser)
sudo
Steps for Setting Up and Running sudo:
CHECK THE SLIDE (Steps for Setting Up and Running sudo)
Why Linux production servers are usually installed without the GUI?
maintaining a lean system, which can be easier to support and keep secure.
______________ are console sessions that use the entire display and keyboard outside of a graphical environment.
Virtual Terminals (VT)
Why Virtual Terminals (VT) Such terminals are considered “virtual” ?
Such terminals are considered “virtual” because, although there can be multiple active terminals, only one terminal remains visible at a time.
VT vs command line Terminal
In a command line terminal, you can have many of those visible simultaneously on a graphical desktop.
One virtual terminal (usually ____________) is reserved for the graphical environment, and text logins are enabled on the unused VTs.
VT 1 or VT 7
To switch between VTs, press
- CTRL-ALT-function key for the VT (CTRL-ALT-F6 for VT 6)
- press the ALT-F6 key combination if you are in a VT and want to switch to another VT
For the newer system-based distributions, the display manager is run as a service, and you can stop the GUI desktop with the ________ utility
systemctl
Turning Off the Graphical Desktop
The preferred method to shut down or reboot the system is to use the _________ command. This sends a warning message, and then prevents further users from logging in
shutdown
The _________ process will control shutting down or rebooting the system.
init
The (1)________ and (2)________commands issue shutdown -h to halt the system;
- halt
- poweroff
_________ issues shutdown -r and causes the machine to reboot instead of just shutting down
reboot