AWS Flashcards

(141 cards)

1
Q

Display system information

A

uname -a

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

Display kernel release information

A

uname -r

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

Show version of redhat installed

A

cat /etc/redhat-release

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

Directory contains static files required to boot the system, for example, the Linux kernel

A

/boot/

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

Contains device nodes that represent the following device types:
devices attached to the system;
virtual devices provided by the kernel.

A

/dev/

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

Directory is reserved for configuration files that are local to the machine. It should contain no binaries

A

/etc/

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

Directory controls which file systems export to remote hosts.

A

/etc/exports

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

This directory should only contain libraries needed to execute the binaries in /bin/ and /sbin/

A

/lib/

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

This directory contains subdirectories used as mount points for removable media.

A

/media/

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

This directory is reserved for temporarily mounted file systems, such as NFS file system mounts.

A

/mnt/

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

This directory is normally reserved for software and add-on packages that are not part of the default installation.

A

/opt/

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

This directory contains special files that either extract information from the kernel or send information to it.

A

/proc/

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

This directory stores binaries essential for booting, restoring, recovering, or repairing the system.

A

/sbin/

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

This directory contains site-specific data served by a Red Hat Enterprise Linux system. This directory gives users the location of data files for a particular service such as FTP, WWW, or CVS.

A

/srv/

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

This directory utilizes the new sysfs virtual file system specific to the 2.6 kernel. Contains information similar to that held by /proc/ but displays hierarchical view of device information specific to hot plug devices.

A

/sys/

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

This directory is for files that can be shared across multiple machines. It is usually on its own partition and is mounted read-only.

A

/usr/

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

This directory stores logs, variable data, spool directories, transient and temporary files.

A

/var/

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

Location of most files pertaining to RPM.

A

/var/lib/rpm/

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

Directory containing files used by the Package Updater, including RPM header information for the system.

A

/var/cache/yum/
or
/var/cache/dnf/

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

File systems available

A

EXT3, EXT4, GFS2, XFS, NFS

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

Types of Servers

A

Web, VNC, File server, LDAP, DHCP, Database, SMTP

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

Port number for SMTP?

A

25

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

What does ARP do?

A

ARP used to map IP address to respective MAC address

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

What is DNS?

A

DNS (Domain Naming Service) which translates host name to IP. Host name could be URL, domain name or FQDN (Fully Qualified Domain Name) of any physical/virtual machine. Reverse DNS translates IP to hostname.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the port number for SSH?
22
26
What is the port number for FTP?
20-21
27
What is the port number for Telnet?
23
28
What is the port number for DNS?
53
29
What is the port number for DHCP?
67 for server 68 for client reply
30
What is the port number for Kerberos?
88 & 464
31
What is the port number for LDAP?
389
32
What is the port number for HTTP?
80
33
What is the port number for HTTPS?
443
34
Graylog requires what other programs?
Elasticsearch and MongoDB
35
What kinds of alert callback does Graylog have?
SMTP and HTTP
36
What is Ansible?
Ansible is a configuration management system. It is used to set up and manage infrastructure and applications. It allows users to deploy and update applications using SSH, without needing to install an agent on a remote system.
37
What's the use of Ansible?
Ansible is used for managing IT infrastructure and deploy software apps to remote nodes. For example, Ansible allows you to deploy as an application to many nodes with one single command. However, for that, there is a need for some programming knowledge to understand the ansible scripts.
38
What is Continuous Delivery?
Continuous delivery is a practice of delivering the software as soon as it developed. In this method, we need to use versioning control system. The software is constantly updated in live production systems.
39
What is the way to access shell environment variables in Ansible?
Use the 'env' lookup plugin.
40
What are ad-hoc commands?
You can think of ad-hoc commands as a way for us to take actions on our hosts without writing a playbook. For example, if we want to reboot all hosts in a particular group(webservers). Then you can write a playbook or simply run a one-off ad-hoc command.
41
Explain modules in ansible
Modules in Ansible are idempotent. From a RESTful service standpoint, for the operation to be idempotent, clients can perform the same result by using modules in Ansible. Multiple identical requests become a single request. There are two different types of modules in Ansible: Core modules Extras modules
42
When should you test playbooks and roles?
In ansible, Tests can be added either in new Playbooks or to existing Playbooks. Therefore, most of the testing job offers a clean hosting each time. By using this testing methodology, you need to make very little to no code changes.
43
What is an API and how does it work?
API stands for Application Programming Interface. An API is a software intermediary that allows two applications to talk to each other. In other words, an API is the messenger that delivers your request to the provider that you're requesting it from and then delivers the response back to you.
44
Show how long the system has been running + load
uptime
45
What is a hash table or hash map
It organizes data so you can quickly look up values for a given key.
46
Show system host name
hostname
47
Display IP addresses of the host
hostname -I
48
Show reboot history
last reboot
49
Show current date and time
date
50
Show this months calendar
cal
51
Display who is online
w
52
Who are you logged in as
whoami
53
Display CPU information
cat /proc/cpuinfo
54
Display memory information
cat /proc/meminfo
55
Display free and used memory
free -h
56
Display hardware info from the BIOS
dmidecode
57
Test for unreadable blocks on SDA
badblocks -s /dev/sda
58
Display and manage the top processes
top
59
Interactive process viewer and top alternative
htop
60
Display processor related statistics
mpstat 1
61
Display virtual memory statistics
vmstat 1
62
Display I/O statistics
iostat 1
63
Display the last 100 syslog messages
tail 100 /var/log/messages
64
List all open files on the system
lsof
65
List files opened by user
lsof -u user
66
Display user and group ids of your current user
id
67
Display the last users who have logged onto the system
last
68
Create a group named "test"
groupadd test
69
Create an account named John, with a comment of "John Smith" and create the users home directory.
useradd -c "John Smith" -m john
70
Delete the John account
userdel john
71
Add the John account to the sales group
usermod -aG sales john
72
List all files in a long listing format
ls -al
73
Display present working directory
pwd
74
Create a directory
mkdir directory
75
Remove (delete) file
rm file
76
Remove the directory and its contents recursively
rm -r directory
77
Force removal of file without prompting for confirmation
rm -f file
78
Forcefully remove directory recursively
rm -rf directory
79
Copy file1 to file2
cp file1 file2
80
Copy source_directory recursively to destination. If destination exists, copy source_directory into destination, otherwise create destination with the contents of source_directory.
cp -r source_directory destination
81
Rename or move file1 to file2. If file2 is and existing directory, move file1 into directory file2.
mv file1 file2
82
Create symbolic link to linkname
ln -s /path/to/file linkname
83
Create an empty file or update the access and modification times of file.
touch file
84
View the contents of file.
cat file
85
Browse through a text file
less file
86
Display first 10 lines of file
head file
87
Display last 10 lines of file
tail file
88
Display the last 10 lines of file and "follow" the file as it grows.
tail -f file
89
Display your currently running processes
ps
90
Display all the currently running processes on the system
ps -ef
91
Display process information for processname
ps -ef | grep processname
92
Kill process with process ID of pid
kill pid
93
Kill all processes named processname
killall processname
94
Start program in the background
program &
95
Display stopped or background jobs
bg
96
Brings the most recent background job to foreground
fg
97
Brings job n to the foreground
fg n
98
Permissions are octal, 4 2 1, for a max of 7. Given RW- RW- R--, what is this represented in octal format as?
664
99
Display all network interfaces and ip address
ifconfig -a
100
Display eth0 address and details
ifconfig eth0
101
Send ICMP echo request to host
ping host
102
Display whois information for domain
whois domain
103
Display DNS information for domain
dig domain
104
Reverse lookup of IP_ADDRESS
dig -x IP_ADDRESS
105
Display DNS ip address for domain
host domain
106
Display the network address of the host name.
hostname -i
107
DIsplay all local ip addresses
hostname -I
108
Download http://domain.com/file
wget https://domain.com/file
109
Display listening TCP and UDP ports and corresponding programs
netstat -nutlp
110
Create tar named archive.tar containing directory.
tar cf archive.tar directory
111
Extract the contents from archive.tar
tar xf archive.tar
112
Create a gzip compressed tar file name archive.tar.gz
tar czf archive.tar.gz directory
113
Extract a gzip compressed tar file
tar xzf archive.tar.gz
114
Create a tar file with bzip2 compression
tar cjf archive.tar.bz2 directory
115
Extract a bzip2 compressed tar file
tar xjf archive.tar.bz2
116
Search for a package by keyword
dnf search keyword
117
Install package
dnf install package
118
Display description and summary information about package.
dnf info package
119
Install package from local file named package.rpm
rpm -i package.rpm
120
Remove/Uninstall package
dnf remove package
121
Install software from source code.
``` tar zxvf sourcecode.tar.gz cd sourcecode ./configure make make install ```
122
Search for pattern in file
grep pattern file
123
Search recursively for pattern in directory
grep -r pattern directory
124
Find files and directories by name
find /home/user -name 'prefix*'
125
Find files larger than 100MB in /home
find /home -size +100M
126
Connect to host as your local username.
ssh host
127
Connect to host as user
ssh user@host
128
Connect to host using port
ssh -p port user@host
129
Secure copy file.txt to the /tmp folder on server
scp file.txt server:/tmp
130
Copy *.html files from server to the local /tmp folder.
scp server:/var/www/*.html /tmp
131
Copy all files and directories recursively from server to the current system's /tmp folder.
scp -r server:/var/www /tmp
132
Synchronize /home to /backups/home
rsync -a /home /backups/
133
Synchronize files/directories between the local and remote system with compression enabled.
rsync -avz /home server:/backups/
134
Show free and used space on mounted filesystems
df -h
135
Show free and used inodes on mounted filesystems
df -i
136
Display disks partitions sizes and types
fdisk -l
137
Display disk usage for all files and directories in human readable format
du -ah
138
Display total disk usage off the current directory
du -sh
139
To go up one level of the directory tree. (Change into the parent directory.)
cd ..
140
Go to the $HOME directory
cd
141
Change to the /etc directory
cd /etc