Lesson 6 - Managing Linux and macOS Flashcards

(79 cards)

1
Q

What is a shell?

A

A shell is a system component providing a command interpreter by which the user can use a kernel interface and operate the OS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a terminal?

A

A terminal is a software that implements input and output for a command shell.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a console?

A

A console is a device the implements input and output for a command shell. In Linux, multiple virtual consoles support use of a single host by multiple user sessions simultaneously.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the standard format for Linux commands?

A
  1. The first “word” input is interpreted as the command. This could be a full or relative path to the executable or just the name of an executable stored in a directory identified by a PATH environment variable. The command word is completed by the first space character.
  2. Options (switches) are used to change the operation of a command. An option can be a single letter (preceded by a single hyphen) or a word (preceded by a double hyphen). The order in which the options are placed on the command in not important.
  3. Arguments are values supplied to the command for it to operate on, such as file names. Arguments must be supplied in the correct order for the command’s syntax
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Are Linux commands case-sensitive?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the Linux command that reports its function and syntax?

A

–help

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How is the command “–help|more” different from “–help”?

A

–help|more shows the results a page at a time while –help shows all the results at once

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the most common text editor?

A

Nano is a command-line text editor operated by CTRL key combinations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What do these CTRL+ key shortcuts mean: CTRL+O and CTRL+X?

A

CTRL+O writes changes to the file and CTRL+X quits the editor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the two modes for vi or vim?

A

Vi is a command-line text editor that extends the original vi software. Vim uses a command mode for file operations and an insert mode for editing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What do these commands in vim command mode mean:
:set number
:w
:wq
:q!

A

:set number is to show line numbers
:w is to save a file
:wq is to save and quit
:q! is to quit without saving

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In a Linux system, what specifies how the directories under root should be named and where types of files should be placed?

A

Linux file system hierarchy standard (FHS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the core commands to navigate the Linux file system?

A

pwd
cd
ls
cat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the function of this Linux command: pwd?

A

pwd shows the current directory (print working directory). The working directory is important because any commands you use which don’t specify a path as an argument will default to the working directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the function of this Linux command: cd?

A

cd (Change Directory) is used to change the working directory.
- Change directory to /etc. This is an absolute path from root (begins with /) so will work regardless of your current directory: cd /etc
- Change your directory to a subdirectory “documents”. This is a relative path because “documents” must exist below the current directory: cd documents
- Chang your directory to the parent directory of the one you are currently working in: cd ..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the function of this Linux command: ls?

A

ls is for listing file system objects.
-l is used to display a detailed list
-a is used to display all files including hidden or system files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the Linux system command path to show the entire contents of the /etc directory in a detailed format?

A

ls -la /etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the function of this Linux command: cat?

A

cat is used to view and combine (concatenate) files. The -n switch adds line numbers to the output. cat output is piped to a pager (cat | more or cat | less) to control scrolling.
cat > file is used to overwrite any data at the destination file.
cat&raquo_space; file is used to append the cat data to the destination file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the function of this Linux command: find?

A

The find command is used to search for files. The basic syntax is “find path expression”, where ‘path’ is the directory in which to start the search and ‘expression’ is the data to match.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the function of this Linux command: grep?

A

The grep (Globally search a Regular Expression and Print) command is used to search and filter the contents of files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the function of this Linux command: cp?

A

cp is used to create a copy of files.
- 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’, keep 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’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is the function of this Linux command: mv?

A

The mv command is used to either move files from one directory to another or rename a file.
- 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’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the function of this Linux command: rm?

A

The rm command can be used to delete files. It can also be used with the ‘-r’ option to delete directories.
- Remove the single file ‘data.old’ from the current working directory: ‘rm 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’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is the function of this Linux command: df?

A

df “disk free” enables you to view the device’s free space, file system, total size, space used, percentage value of space used, and mount point.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the function of this Linux command: du?
du "disk usage" displays how a device is used, including the size of directory trees and files within it
26
What is the term for an administrator account in Linux?
root user or superuser
27
What is the function of this Linux command: su?
The su (switch user) command switches to the account specified by username: 'su username'. Using 'su-' changes to the root user and launches a new shell under the context of root
28
What is the function of this Linux command: sudo?
The sudo (superuser do) command allows any account listed in the '/etc/sudoers' file user to run specified commands with superuser privilege level. The user enters the 'sudo' command followed by th command the user wishes to run.
29
What are the Linux commands to add, modify, and delete user info? And change password?
useradd usermod userdel passwd
30
What are the Linux commands to manage group memberships?
groupadd groupmod groupdel
31
Linux uses a permissions system with what three rights?
1. Read (r) gives permission to view the contents of a file or directory. 2. 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. 3. 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
32
What is symbolic notation?
Symbolic notation is syntax for setting Linux permissions that uses characters to represent permissions values. Each permission is allowed (r or w or x) or denied (-).
33
What is chmod?
chmod is a Linux command for managing file permissions.
34
What is chown?
chown is a Linux command for managing the account owner for files and directories.
35
What is apt-get?
apt-get is one of the package management tools available in Linux for installing and updating software. -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
36
What is this command used for: yum?
yum is a package manager for installing, maintaining, inventorying, and removing software from the Red Hat family of Linux distributions. - 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
37
What is the ps command?
The ps command is for retrieving process information. When the command is run without any option, is displays the processes run by the current shell with details such as PID, the terminal associated with the process, the accumulated CPU time, and the command that started the process.
38
What is the top command?
The top command is an interactive Linux command for monitoring process information. It acts as a process management tool by enabling you to prioritize, sort, or terminate processes interactively.
39
What do these keystrokes within the top command do: -Enter -Shift+N - M - P - u - q?
- Enter: Refresh the status of all processes - Shift+N: Sort processes in the decreasing order of their PID - M: Sort processes by memory usage - P: Sort processes by CPU usage - u: Display processes belonging to the user specified at the prompt - q: Exit the process list
40
What is the ip command?
The ip command tool is used to gather information about the IP configuration of the network adapter or to configure the network adapter. - Replicate the basic reporting function of ipconfig: ip addr - Report a single interface only: ip addr show dev eth0 - Show status of interfaces: ip link - Report interface statistics: ip -s link
41
What is the dig command?
dig is a utility to query a DNS server and return information about a particular domain name or resource record.
42
What is Samba?
Samba is a Linux software package that implements Server Message Block (SMB) file/print sharing, primarily to support integration with Windows hosts.
43
What is the cron?
Cron is a task scheduler and can file copy scripts. It is used as a backup tool for Linux systems. If you want to run a batch of commands or a script to perform a backup or other maintenance task, there is a scheduling service called cron. Every user of the system is allowed to schedule programs or tasks in their own personal crontab (cron table). These tables are merged by cron to create an overall system schedule. Every minute, the cron service checks the schedule and executes the programs for that period.
44
What is used to add or delete a scheduled cron task?
crontab editor
45
What command is used to review a user's crontab job?
crontab -1
46
What command is used to remove jobs from the cron schedules list?
crontab -r
47
What do these basic syntax mean for scheduling a job using crontab: - mm - hh - dd - MM - weekday - command
- mm: specifies the minutes past the hour when the task is to initiate (0-59) - hh: specifies the hour (0-23) - dd: can be used to specify the date within the month (0-31) - MM: specifies the month in either numerical or text format (1-12 or jan, feb, mar) - weekday: sets the days of the week (1-7 or mon, tue, wed) - command: the command or script to run. This should include the full path to the file.
48
What is the meaning of these wildcard symbols for cron scheduled tasks: - * - , - - - /2
- * specifies any or other characters - , allows multiple values - - allows a range of values - /2 indicates every other
49
Which Linux command will display detailed information about all files and directories in the current directory, including system files?
ls -la
50
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.
51
What command would allow you to delete the contents of the folder /home/jaime/junk and all its subdirectories?
rm -r /home/jaime/junk
52
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
53
A file is secured with the numeric permissions 0774. What rights does another user account have over the file?
Read-only.
54
Which Linux command allows a user to run a specific command or program with superuser/root privileges?
sudo
55
What is the dock in macOS?
Dock is a macOS feature for managing applications from the desktop; like a taskbar. located at the bottom of the display
56
What are the two main ways to search in macOS?
Spotlight Search (magnifying glass) in the menu bar or press COMMAND+SPACE
57
What is the Terminal in macOS?
The Terminal can be used to access the command-line environment, which uses either the Z shell (zsh) or Bash for older macOS versions.
58
What is the Mission Control feature in macOS?
Mission Control is an app that facilitates multiple desktops in macOS. To set up and remove desktops, activate Mission Control with the F3 key. To switch between desktops, press the F3 key and choose a desktop or use CONTROL+LEFT or CONTROL+RIGHT or a 3/4 finger swipe gesture.
59
What is the System Preferences panel in macOS?
System Preferences is a macOS control panel hosting multiple configuration utilities. It is the equivalent of the Windows Settings app.
60
What is the function of Displays prefpane in macOS?
Displays prefpane allows you to scale the desktop, set brightness level, calibrate to a given color profile, and configure Night Shift settings to make the display adapt to ambient light conditions.
61
What is the Accessibility prefpane in macOS?
The Accessibility prefpane is a utility related to desktop and input/output device accessibility configuration. It is used to configure assistive vision and sound options, cursor size and motion settings, zoom tools, display contrast and font sizes, and captioning.
62
Where can you add a new user in macOS?
System Preferences>Users & Groups
63
What is an Apple ID?
Apple ID is cloud-based service allowing users to synchronize settings and manage apps, file sharing, and backups between multiple Apple devices. It is used for purchases from the App Store, accessing iCloud and other functions.
64
What is the function of the Security & Privacy prefpane?
Security & Privacy prefpane is used to configure what analytics/telemetry data and personalized information can be collected, plus permissions for apps to use features such as the location service or camera or data stores such as contacts and calendar.
65
What is the Internet Accounts prefpane used for?
The Internet Accounts prefpane can be used to associate other email and cloud accounts with your login.
66
What is the function of the keychain in macOS?
Keychain is the macOS app for managing passwords caches by the OS and supported browser/web applications. aka iCloud Keychain
67
What is the function of FileVault in macOS?
FileVault is a disk encryption product. similar to bitlocker
68
What is the function of Finder in macOS?
Finder is the macOS equivalent of File Explorer in Windows. Its a file management app.
69
What is the function of iCloud?
iCloud is a mobile/cloud computing office-productivity and data-storage suite operated by Apple and closely integrated with macOS and iOS. It provides a central, shared location for mail, contracts, calendar, photos, notes, reminders, and so on across macOS and iOS devices.
70
What are the two main macOS package installer formats?
- 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.
71
What is the function of the Disk Utility app in macOS?
Disk Utility is a macOS tool for disk and file system support tasks. It can be used to verify or repair a disk or file system. It can also be used to erase a disk with security options in case you are selling or passing on a Mac
72
What is the function of the Time Machine prefpane?
The Time Machine is a macOS app facilitating backup operations. It enables data to be backed up to an external drive or partition formatted using either APFS or macOS's older extended file system
73
If a macOS app stops responding, what are the actions to close the app and restart it?
Run Force Quit (macOS tool for halting a process; equivalent to the process management functionality in Task Manager) from the Apple menu or press COMMAND+OPTION+ESC
74
What are the steps to access the Recovery menu in macOS?
As the Apple Mac powers up, hold down the COMMMAND+R keys until you see the Apple logo. After selecting your language, it will boot into macOS Recovery, enabling you to select from these options: Restore from Time Machine Backup, Reinstall macOS, Get Help Online, or Disk Utility
75
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.
76
How do you activate Spotlight Search using the keyboard?
COMMAND+SPACEBAR.
77
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.
78
How would you update an app purchased from the Mac App Store?
Open the Mac App Store and select the Updates button.
79
What is the name of Apple's backup software for macOS?
Time Machine.