AWS Flashcards
Display system information
uname -a
Display kernel release information
uname -r
Show version of redhat installed
cat /etc/redhat-release
Directory contains static files required to boot the system, for example, the Linux kernel
/boot/
Contains device nodes that represent the following device types:
devices attached to the system;
virtual devices provided by the kernel.
/dev/
Directory is reserved for configuration files that are local to the machine. It should contain no binaries
/etc/
Directory controls which file systems export to remote hosts.
/etc/exports
This directory should only contain libraries needed to execute the binaries in /bin/ and /sbin/
/lib/
This directory contains subdirectories used as mount points for removable media.
/media/
This directory is reserved for temporarily mounted file systems, such as NFS file system mounts.
/mnt/
This directory is normally reserved for software and add-on packages that are not part of the default installation.
/opt/
This directory contains special files that either extract information from the kernel or send information to it.
/proc/
This directory stores binaries essential for booting, restoring, recovering, or repairing the system.
/sbin/
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.
/srv/
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.
/sys/
This directory is for files that can be shared across multiple machines. It is usually on its own partition and is mounted read-only.
/usr/
This directory stores logs, variable data, spool directories, transient and temporary files.
/var/
Location of most files pertaining to RPM.
/var/lib/rpm/
Directory containing files used by the Package Updater, including RPM header information for the system.
/var/cache/yum/
or
/var/cache/dnf/
File systems available
EXT3, EXT4, GFS2, XFS, NFS
Types of Servers
Web, VNC, File server, LDAP, DHCP, Database, SMTP
Port number for SMTP?
25
What does ARP do?
ARP used to map IP address to respective MAC address
What is DNS?
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.
What is the port number for SSH?
22
What is the port number for FTP?
20-21
What is the port number for Telnet?
23
What is the port number for DNS?
53
What is the port number for DHCP?
67 for server 68 for client reply
What is the port number for Kerberos?
88 & 464
What is the port number for LDAP?
389
What is the port number for HTTP?
80
What is the port number for HTTPS?
443
Graylog requires what other programs?
Elasticsearch and MongoDB
What kinds of alert callback does Graylog have?
SMTP and HTTP
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.
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.
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.
What is the way to access shell environment variables in Ansible?
Use the ‘env’ lookup plugin.
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.
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
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.
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.
Show how long the system has been running + load
uptime
What is a hash table or hash map
It organizes data so you can quickly look up values for a given key.
Show system host name
hostname
Display IP addresses of the host
hostname -I
Show reboot history
last reboot
Show current date and time
date
Show this months calendar
cal
Display who is online
w
Who are you logged in as
whoami
Display CPU information
cat /proc/cpuinfo
Display memory information
cat /proc/meminfo
Display free and used memory
free -h
Display hardware info from the BIOS
dmidecode