Lesson 6: Managing Linux and macOS Flashcards
System component providing a command interpreter by which the user can use a kernel interface and operate the OS.
shell
Command interpreter and scripting language for Unix-like systems.
bash
Software that implements input and output for a command shell.
terminal
tty
teletype
Device that implements input and output for a command shell. In Linux, multiple virtual consoles support use of a single host by multiple user sessions simultaneously.
console
Command-line text editor operated by CTRL key combinations.
Nano text editor
•
•
FHS
File system Hierarchy Standard
Linux command for showing the current directory
pwd
* (“Print Working Directory”)*
What is the cd command used to do?
change the working directory
What does the ls command do?
listing file system objects
ls lists the contents of a directory, in a similar way to dir at the Windows command prompt. Popular parameters include -l to display a detailed (long) list and -a to display all files including hidden or system files.
Linux command to view and combine (concatenate) files.
cat command
•
•
In Linux, there are overwrite and append redirection operators: What does this command do *cat»_space; file**?
Append the cat data to the destination file
Command-line Linux tool used to search the file system
find command
Linux command for searching and filtering input. This can be used as a file search tool when combined with ls
grep command
what does grep stand for
Globally search a Regular Expression and Print command is used to search and filter the contents of files. Its output prints (displays) the lines that contain a match for the search string.
Command-line tool for copying files in Linux
cp command
Copy file1.txt in the current working directory to a new file called file1.old in the same directory
cp file1.txt file1.old
Copy the file hosts from the directory /etc into the directory /tmp , keeping the file name the same:
cp /etc/hosts /tmp
Copy all files beginning with the name message from the /var/log directory into /home/david. The -v option displays the files copied:
cp -v /var/log/message* /home/david
Command-line tool for moving files in Linux
mv command
Move the file data.txt from the /home/david directory to the /tmp directory, keeping the file name the same:
mv /home/david/data.txt /tmp
Move and rename the file alarm.dat in the current directory to alarm.bak in /tmp:
mv alarm.dat /tmp/alarm.bak
Rename the file app1.dat in the /var/log folder to app1.old:
mv /var/log/app1.dat /var/log/app1.old
Command-line tool for deleting file system objects in Linux
rm command
Remove the single file data.old from the current working directory:
data.old
Remove all files ending in .bak from the /var/log directory:
rm /var/log/.bak*
Remove the contents of the entire directory tree underneath the folder /home/david/data:
rm -r /home/david/data
Command-line tools used to report storage usage in Linux. Can be used to delete files. It can also be used with the -r option to delete directories
df and du command
disk free and disk usage
Linux commands allowing a user to use the root account or execute commands restricted to privileged users
su command
switch user
Linux commands allowing a user to use the root account or execute commands restricted to privileged users
sudo command
superuser do
What is the main advantage of sudo over su command?
The main advantage of sudo over su is that the root password does not have to be shared between multiple administrators.
Linux uses a permissions system with three rights, what are they? (3)
Read (r), Write (w), and Execute (x)
Read (r) gives permission to view the contents of a file or directory.
Write (w) gives permission to modify or delete the object. In the case of directories, this allows adding, deleting, or renaming files within the directory.
Execute (x) gives permission to run an executable file or script. For directories, execute allows the user to do things such as change the focus to the directory and access or search items within it
Linux command for managing file permissions
chmod command
Linux file-permission mode that uses numeric values to represent permissions
octal notation
Linux command for managing the account owner for files and directories. Allows the superuser to change the owner of a file or directory.
chown command
APT
Advanced Packaging Tool
Used by Debian distributions and works with .deb format packages.
APT
Used by Red Hat distributions and works with .rpm format packages
YUM
One of the package management tools available in Linux for installing and updating software
apt-get command
Refresh the local database with information about the packages available from the repository:
apt-get update
Update all packages with the latest versions:
apt-get upgrade
Install a new application:
apt-get install PackageName
Package manager for installing, maintaining, inventorying, and removing software from the Red Hat family of Linux distributions
yum
Refresh the local database with information about the packages available from the repository:
yum check-update
Update all packages with the latest versions:
yum update
Install a new application:
yum install PackageName
Linux command for retrieving process information. Invokes the process table, a record that summarizes the currently running processes on a system.
ps command
Interactive Linux command for monitoring process information
top command
table of processes
Deprecated Linux command tool used to gather information about the IP configuration of the network adapter or to configure the network adapter.
ifconfig
Linux command tool used to gather information about the IP configuration of the network adapter or to configure the network adapter.
ip command
Utility to query a DNS server and return information about a particular domain name or resource record. A powerful tool for gathering information and testing name resolution.
dig command
Linux software package that implements Server Message Block (SMB) file/print sharing, primarily to support integration with Windows hosts
Samba
Scheduled task that is managed by the Linux cron daemon.
cron task scheduler
To add or delete a scheduled job, use the crontab editor. To review a user’s crontab jobs, enter the command:
crontab –l
To remove jobs from the scheduled list, use the command:
crontab -r
A command has generated a large amount of data on the screen. What could you add to the command to make the output more readable?
Either | more or | less
Which Linux command will display detailed information about all files and directories in the current directory, including system files?
ls -la
What command could you use to move a file names.doc from your current directory to the USB stick linked to folder /mnt/usb?
mv names.doc /mnt/usb
A file is secured with the numeric permissions 0774. What rights does another user account have over the file?
Read-only
What command would allow you to delete the contents of the folder /home/jaime/junk and all its subdirectories?
rm -r /home/jaime/junk
Which Linux command allows a user to run a specific command or program with superuser/root privileges?
sudo
macOS feature for managing applications from the desktop; similar to the Windows taskbar
Dock
macOS file system search tool. Can be used to find almost anything on macOS
Spotlight search
App facilitating multiple desktops in macOS
Mission Control
macOS control panel hosting multiple prefpane configuration utilities.
System Preferences panel
macOS utility related to desktop and input/output device accessibility configuration. Used to configure assistive vision and sound options, such as VoiceOver narration of screen elements, cursor size and motion settings, zoom tools, display contrast and font sizes, and captioning.
Accessibility prefpane
Add a new account
Open System Preferences > Users & Groups
Cloud-based service allowing users to synchronize settings and manage apps, file sharing, and backups between multiple Apple devices.
Apple ID
macOS app for managing passwords cached by the OS and supported browser/web applications.
keychain
macOS disk encryption product. A disk encryption product.
FileVault
File management app in macOS. The macOS equivalent of File Explorer in Windows.
the Finder
Mobile/cloud computing office-productivity and data-storage suite operated by Apple and closely integrated with macOS and iOS. Apple’s online storage solution for its users.
iCloud
macOS installer format that can be copied directly to the Applications folder. Format is used for simple installs where the package contents just need to be copied to the Applications folder.
DMG
DMG
disk image
macOS installer format that supports complex setup tasks. Format is used where app setup needs to perform additional actions, such as running a service or writing files to multiple folders.
PKG
Default extension for a macOS app subdirectory when installed to the Applications folder
.APP extension
macOS tool for disk and file system support tasks. App that can be used to verify or repair a disk or file system.
Disk Utility
macOS tool for sharing an optical drive over the network. App which lets the user access a CD/DVD drive on another Mac or Windows computer.
Remote Disc
App facilitating backup operations in macOS. Enables data to be backed up to an external drive or partition formatted using either APFS or macOS’s older extended file system
Time machine
macOS indicator that a process is busy and is not able to accept input. When an app is busy or processing a complex request.
spinning wait cursor
macOS tool for halting a process; equivalent to the process management functionality in Task Manager.
Force Quit
How do you activate Spotlight Search using the keyboard?
COMMAND+SPACEBAR
Where would you look for the option to view and configure wireless adapter status in macOS?
In the Status menu on the Menu bar, in the top-right of the screen, or in the Network prefpane
How would you update an app purchased from the Mac App Store?
Open the Mac App Store and select the Updates button
Your company is replacing its Windows desktops with Mac workstations, and you need to assist users with the transition. What is the equivalent of File Explorer in macOS?
The Finder
What is the name of Apple’s backup software for macOS?
Time Machine
A Windows user decides to start testing out Macs. They are working on a paper for school and need to cut and paste quite a bit. On the PC keyboard, they use Ctrl+X and Ctrl+V. What key should they use on the Mac?
A.Option
B.Command
C.Apple
D.Magic Mouse
B. Command
Where PC and Linux keyboards use CTRL, ALT, ALTGR, and START modifier keys, Mac keyboards have an APPLE/POWER key and COMMAND, OPTION, and CONTROL keys. COMMAND is closest to the CTRL key in terms of functionality.
OPTION is usually mapped to ALT. Use the Keyboard pane in System Preferences to map keys if using a non-Apple keyboard to operate a Mac.
The Apple key is the power button. This will definitely not help the user to cut and paste and might even cause loss of data if not saved properly.
Macs do not support touch screen interfaces, but they do support gesture-enabled Magic Mouse and Magic Trackpad peripherals.
After downloading a new app from the internet, a user drags the file from the Downloads folder to the Applications folder on their Mac. What occured as a result of this activity?
A.The package contents were copied.
B.The app setup needs to perform additional actions.
C.The application was sideloaded.
D.The app was installed.
D.The app was installed.
When the app has been installed, it is placed in a directory with a .app extension in the Applications folder.
DMG (disk image) format is used for simple installs where the package contents just need to be copied to the Applications folder.
PKG format is used where app setup needs to perform additional actions, such as running a service or writing files to multiple folders.
Devices that allow installation of apps from untrusted sources, such as by sideloading APK packages or via developer mode, could also have weakened permissions.
A Linux administrator needs to run automation scripts and looks for a shell on their server. Which of the following should they NOT look for?
A.Bash
B.Zsh
C.Ksh
D.TTY
D. TTY
The terminal and shell are connected by a teletype (TTY) device that handles text input and output in separate streams.
The shell provides a command environment by which a user can operate the OS and applications. Many shell programs are available to use with Linux, with bash being the most notable.
Zsh is another common shell program. These shells expose the same core command set but are distinguished by support for features such as command history, tab completion, command spelling correction, or syntax highlighting.
Ksh (Korn shell) is another common shell program.
A client systems administrator for Mac computers wants to ensure users’ data is backed up locally. What should the administrator enable?
A.Recovery
B.Disk Utility
C.Time Machine
D.App Store
C. Time Machine
A Linux server administrator wants to elevate their privileges. Which of the following commands makes elevating an account possible? (Select all that apply.)
A.su
B.passwd
C.sudo
D.chown
A. su and C. sudo
An intern is going to work for the Linux administration team. They need to use a file editor but are not familiar with Linux. Which of the following is the easiest to use coming from a non-Linux background?
A.vi
B.nano
C.cat
D.cp
B. nano
The Nano text editor is a basic example often preferred by those coming from a Windows environment. To open or create a file, use nano filepath or nano -l filepath to show line numbers.
Many administrators prefer to use vi or vim. These tools have two modes. Command mode is used for file operations, such as writing changes and closing the editor.
While cat is not a file editor, it can be used to view the contents of a file or even write to a file.
Cp is used to create a copy of files either in the same or different directory with the same or different name.
A security administrator wants to harden Linux machines and remove any unnecessary running processes. What command can the administrator use to inventory running processes of the current shell?
A.ip
B.dig
C.chmod
D.ps
D. ps
A penetration tester is asked to perform an assessment on the new Mac laptops a company brought into the environment. After loading a shell on a user’s computer, the tester needs to find the passwords. Where should the tester look?
A.FileVault
B.Security & Privacy
C.Apple ID
D.Keychain
D. Keychain
A coffee company sets up computer kiosks for customers. The company wants a hip trendy setting so they decide to use Mac computers. However, the person setting it up is unfamiliar with macOS. What can they use to acquire information for this task?
A.Spotlight Search
B.Dock
C.Terminal
D.Mission control
A. Spotlight Search
A server administrator wants to keep up with security patches and configures their machines to pull updates. What should the administrator configure for clients to pull updates from?
A.Distribution
B.apt-get
C.Repositories
D.Yum
C. Repositories
Copies of distribution packages (including any updates) will be posted to a software repository. Often the vendor will maintain different repositories. It can then be used to install, uninstall, or update the software.
A distribution contains any precompiled software packages the vendor or sponsor considers appropriate. The distributions are pushed to the repositories.
apt-get is a command interface for APT. The update, upgrade, and install commands are used to update/patch and install software.
Yum is the command interface for YUM. The update, check-update, and install commands are used to update/patch, and install software.