Lesson 6A Managing Linux Flashcards

1
Q

Shell

A

Provides a command environment by which a user can operate the OS and application.(Bash, zsh, and ksh(Korn Shell))

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

Terminal

A

Software that implements input and output for a command shell. The Terminal and the Shell are connected by a teletype device.

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

stdin(0)

A

Takes the user’s keyboard input and writes it as data to the tty device for processing by the shell command interpreter.

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

stdout(1)

A

Reads data generated by the shell from the tty device and displays it through the terminal.

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

stderr(2)

A

Carriers error information.

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

Console Switching

A

Device that implements input and output for a command shell.
CTRL+ALT+Fx keys can be used to switch consoles.

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

Commands

A

The first “word” input is interpreted as the command.
Options(switches) - Are used to change the operations of a commands.
Arguments- Values supplied to the command for it to operate on, such as file names.
Pipe command(|)- Allows the usage of two commands.

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

Case Sensitivity

A

Commands, Parameters, and files and directory names are all case sentitive in Linux.
ls -l and ls-L will produce different outputs.

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

Help System

A

Reports the functions and syntax when executed as –help. Ex. ls –help | more

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

Nano

A

Nano text editor. nano filepath or nano -| filepath showing line numbers.
CTRL+O writes changes to the files.
CTRL+X quits the editor.

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

Vi or Vim

A

Preferred by Administrators
Switches
i - switches to insert mode at the current cursor position.
a- appends text after the current position.
A- appends text at the end of the current line
o- insert text on a new line below the current line.
ESC key- switches from insert mode back to command mode.
: set number- Shows line numbers in command mode.
:w- saves the file.
:wq- saves and quits
:q! - quits without saving

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

Navigation Commands

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

pwd Command

A

Print the working directory that you are currently using.

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

cd Command

A

Used to change directory.
cd /etc leads to an absolute directory.
cd document leads to subdirectory(relative path) named documents.
cd ..

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

ls Command

A

List the contents of the directory
Switches
-l - displays a long list
-a - displays all files including the hidden ones.

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

cat Command

A

Returns the content of the files listed as arguments.
Switches
-n- adds line numbers to the output.
Overwrite = cat > file
Append = cat&raquo_space; file

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

Search Commands

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

find Command

A

is used to search for files.

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

grep Command

A

Used to search and filter the contents of a file.

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

File Management Commands

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

cp Command

A

Used to create a copy of a file in the same or a different directory with the same name or a different name.

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

rm Command

A

Can be used to delete files.
-r can be used to delete a directory

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

mv

A

Used to either move a file from one directory to another or to rename a file.

24
Q

df Command
Disk Free

A

Enables to see the disks free space, file system, total size, space used, percentage valuie of spaced used, and mount point.

25
Q

du Command
Disk Usage

A

Displays how a device is used, including the size of a directory tree.

26
Q

User Account Commands

A
27
Q

su Command

A

Used to switch users: su username
su - will prompt the superuser account.

28
Q

sudo Command

A

allows any account listed in the /etc/sudoers file user to run specified commands with superuser privilege level

29
Q

User Management Commands

A

useradd- add user data
usermod- modify user data
userdel-delete user data

30
Q

Group Management Commands

A

groupadd
groupmod
groupdel
Used to manage group permissions

31
Q

File Permissions Commands

A
32
Q

Read
Write
Execute

A

(r)Gives permission to view the content of a file or directory.
(w) Gives permission to modify or delete the file.
(x) Gives permission to run an executable file or script.

33
Q

Permissions expressed numerically

A

Read = 4
Write = 2
Execute = 1
Denied = 0

34
Q

chmod

A

Can be used to secure files and directories, using either symbolic notation o roctal notation.
Only the owner can change permissions.

35
Q

chown Command

A

Allows the superuser to change the owner of a file or a directory.
Can only be used by a superuser or sudoer.

36
Q

Package Management Commands

A
37
Q

apt-get update Command

A

Refresh the local database with information about the packages available from the repository.

38
Q

apt-get upgrade Command

A

C

39
Q

apt-get install PackageName

A

Installs a new application.

40
Q

yum check-update

A

Refresh the local database with information about the packages available from the repository.

41
Q

yum update

A

Refresh the local database with information about the packages available from the repository.

42
Q

yum install PackageName

A

Installs a new application.

43
Q

Process Monitoring Commands

A

Every process is assigned a unique Process ID when it is started so that the system can identify the process.

44
Q

ps commands

A

Invokes a process table, a record that summarizes the currently running programs on a system.

45
Q

top Command

A

List all the processes running on a Linux System. It acts as a process management tool by enabling you to prioritize, sort, or terminate processes interactively.

46
Q

Top Options

A

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.

47
Q

Network Management Commands

A
48
Q

ifconfig

A

Part of the legacy net-tools package
Safely be used to report the network interface configuration.

49
Q

ip addr

A

replicates the basic reporting functionality of ifconfig
report a single interface only, use
ip addr show dev eth0

50
Q

ip link

A

ip link command shows the status of interfaces, while
ip -s link reports interface statistics.

51
Q

dig command

A

Utility to query a DNS server and return information about a particular domain name or resource record.

52
Q

Samba

A

Linux software package that implements Server Message Block (SMB) file/print sharing, primarily to support integration with Windows hosts.

53
Q

Backup and Scheduling Commands

A

In Linux their is no official “backup”. Cron can be used as a task scheduler and file copy scripts.

54
Q

crontab -l

A

Reviews a user’s contab job.

55
Q

crontab -r

A

Remove jobs from the scheduled list.

56
Q

crontab -e

A

uses the vi editor
Basic syntax for scheduling a job.
mm - minutes (0-59)
hh- hours(0-23)
dd- days (0-31)
MM- months(1-12) or jan, feb, mar
weekday- (day of the week(1-7 or mon, tue, wed))
command-command or script to run (include the file path)

57
Q
A