Linux Fundamentals - Docx11
Linux Fundamentals - Docx11
1. **What is Linux?**
Sol: LINUX is a free and open-source operating system (OS). It's comparable to UNIX.
• It is one of the most widely supported operating systems because it runs on almost every
major computer platform, including x86, ARM, and SPAR
free operating system, open source, flexibility, customizability, multi user, portability, shell,
security
Sol:
Linux was created by Linus Torvalds, a Finnish software engineer, in 1991. He
released the first version of the Linux kernel to the public on September 17,
1991. Since then, it has become one of the most prominent examples of free and
open-source software collaboration.
KEY DIFFERENCE Linux source code is available to the general public whereas, in
Unix, the source code is proprietary.
3. **Distributions: **
Debian and Red Hat Enterprise Linux differ in their package management
systems, release models, support approaches, initialization systems, default
desktop environments, and licensing policies.
- What are the common file systems used in Linux (e.g., ext4, XFS, Btrfs)?
5. **Important Directories:**
- Describe the purpose of directories like `/etc`, `/home`, `/var`, `/bin`, `/usr`, and `/root`.
1.
6. **File Permissions:**
7. **Basic Commands:**
- What do the following commands do: `ls`, `cd`, `pwd`, `cp`, `mv`, `rm`, `mkdir`?
Top 50 Linux Commands You Must Know as a Regular User
1. ls - The most frequently used command in Linux to list directories
2. pwd - Print working directory command in Linux
3. cd - Linux command to navigate through directories
4. mkdir - Command used to create directories in Linux
5. mv - Move or rename files in Linux
6. cp - Similar usage as mv but for copying files in Linux
7. rm - Delete files or directories
8. touch - Create blank/empty files
9. ln - Create symbolic links (shortcuts) to other files
10. clear - Clear the terminal display
11. cat - Display file contents on the terminal
12. echo - Print any text that follows the command
13. less - Linux command to display paged outputs in the terminal
14. man - Access manual pages for all Linux commands
15. uname - Linux command to get basic information about the OS
16. whoami - Get the active username
17. tar - Command to extract and compress files in linux
18. grep - Search for a string within an output
19. head - Return the specified number of lines from the top
20. tail - Return the specified number of lines from the bottom
21. diff - Find the difference between two files
22. cmp - Allows you to check if two files are identical
23. comm - Combines the functionality of diff and cmp
24. sort - Linux command to sort the content of a file while outputting
25. export - Export environment variables in Linux
26. zip - Zip files in Linux
27. unzip - Unzip files in Linux
28. ssh - Secure Shell command in Linux
29. service - Linux command to start and stop services
30. ps - Display active processes
31. kill and killall - Kill active processes by process ID or name
32. df - Display disk filesystem information
33. mount - Mount file systems in Linux
34. chmod - Command to change file permissions
35. chown - Command for granting ownership of files or folders
36. ifconfig - Display network interfaces and IP addresses
37. traceroute - Trace all the network hops to reach the destination
38. wget - Direct download files from the internet
39. ufw - Firewall command
40. iptables - Base firewall for all other firewall utilities to interface with
41. apt, pacman, yum, rpm - Package managers depending on the distribution
42. sudo - Command to escalate privileges in Linux
43. cal - View a command-line calendar
44. alias - Create custom shortcuts for your regularly used commands
45. dd - Majorly used for creating bootable USB sticks
46. whereis - Locate the binary, source, and manual pages for a command
47. whatis - Find what a command is used for
48. top - View active processes live with their system usage
49. useradd and usermod - Add a new user or change existing user data
passwd - Create or update passwords for existing users
- How would you display the contents of a file? Explain the usage of `cat`, `more`, `less`, and `tail`.
8. **Process Management:**
- How do you view running processes? Explain the `ps` and `top` commands.
- How do you kill a process? Explain the `kill` and `killall` commands.
9. **Text Editors:**
- What are package managers? Name the package managers used by Debian and Red Hat-based
systems.
- How do you install, update, and remove software packages using `apt` and `yum`?
### Networking
Ifconfig
Ipconfig
NetStat
is a networking utility that can be used to display all
NetStat
active network connections and their status. It can be used to
identify which applications are using which ports and can be
helpful in troubleshooting networking issues.
NbtStat: is a networking utility in Windows that helps
users troubleshoot NetBIOS over TCP/IP problems. It
can be used to display a variety of information about
the current state of the NetBIOS over TCP/IP protocol
on both local and remote computers
ARP
Nslookup
is a command-line networking tool used for querying
Nslookup
Domain Name System (DNS) to obtain domain name or IP
address mapping, or other DNS records. Nslookup has two
modes: interactive and non-interactive.
- How do you check your IP address? Explain the use of `ifconfig` or `ip`.
- How do you test network connectivity? Explain the use of `ping` and `traceroute`.
- How do you copy files between local and remote systems using `scp` or `rsync`?
### Security
- How do you add and remove users in Linux? Explain the use of `useradd` and `userdel`.
16. **Firewall:**
In Linux, there are several firewall solutions available, but one of the most
commonly used is called iptables, which is a user-space utility program
that allows a system administrator to configure the IP packet filter rules of
the Linux kernel firewall.
- What is the Linux kernel? How can you view the loaded kernel modules?
The Linux kernel is the core component of the Linux operating system. It acts as
an intermediary between the hardware and the software applications running on
the system. The kernel provides essential functionalities such as process
management, memory management, device drivers, file system support, and
system calls.
Loading and unloading kernel modules in Linux can be done using the modprobe command
to load modules and the rmmod command to unload modules. Here's how you can do it:
bash
Copy code
sudo modprobe nls_utf8
This command will load the nls_utf8 module into the kernel. If the
module has dependencies, modprobe will automatically load them as
well.
This command will unload the nls_utf8 module from the kernel. If
the module is in use (i.e., there are instances of it currently being
used by other modules or processes), rmmod will fail to unload it. In
such cases, you may need to first stop the processes or unload the
dependent modules before unloading the target module.
bash
Copy code
lsmod
- Where are system logs stored in Linux? Explain the role of `/var/log`.
In Linux, system logs are stored in various locations within the file system, with
the primary directory for system logs being /var/log. This directory contains log
files generated by various system processes, services, and applications,
providing valuable information for monitoring, troubleshooting, and auditing
system activity.
1. /var/log Directory:
In Linux, there are several commands and utilities available for viewing log files and
retrieving system logs. Two commonly used utilities are dmesg and journalctl, each
serving different purposes:
1. dmesg:
The dmesg command displays the kernel ring buffer, which contains messages logged
by the kernel during the boot process and ongoing system operation. These messages
include information about hardware detection, device initialization, kernel modules
loading, and various kernel events.
To view the kernel ring buffer with dmesg, simply run the command in a terminal:
bash
Copy code
dmesg
By default, dmesg displays the entire contents of the kernel ring buffer. However, you
can use various options to filter and format the output, such as:
-c: Clear the contents of the kernel ring buffer after displaying it.
-H: Use human-readable timestamps.
-T: Display timestamps in a human-readable format.
-L: Display log levels (e.g., INFO, WARNING, ERROR) with messages.
For example, to view the last 100 lines of the kernel ring buffer with human-readable
timestamps, you can use:
bash
Copy code
2. journalctl:
The journalctl command is part of the systemd journal system, which provides
centralized logging for system events and services. It retrieves and displays logs from
the systemd journal, which includes not only kernel messages but also messages from
user-space services and applications.
To view system logs with journalctl, you can simply run the command in a
terminal:
bash
Copy code
journalctl
By default, journalctl displays logs starting from the current boot session.
However, you can use various options to filter and format the output, such as:
19. **Virtualization:**
- Name some tools and platforms used for virtualization in Linux (e.g., KVM, VirtualBox, Docker).
- How do you create backups in Linux? Explain the use of `tar`, `rsync`, and `dd`.
Creating backups in Linux can be accomplished using various tools and
methods, depending on factors such as the size of the data to be backed
up, the frequency of backups, storage options, and the desired level of
automation. Here are some common approaches to creating backups in
Linux:
- Demonstrate creating a new file and directory, navigating between directories, and deleting them.
- Show how to redirect the output of a command to a file and append to an existing file.
- Write a simple shell script that performs a specific task, such as backing up a directory or
monitoring disk usage.
By preparing answers and practicing these topics, you'll be well-equipped for your viva on Linux
fundamentals. Good luck!
Topic -2
### Windows Server Fundamentals
- How does Windows Server differ from a regular desktop operating system?
2. **Versions and Editions:**
- What are the different versions of Windows Server? Name some key versions and their release
years.
3. **Installation:**
4. **Active Directory:**
- What are server roles and features? Give examples of common roles.
#### Networking
An Internet Protocol (IP) address is the unique identifying number assigned to every
device connected to the internet. An IP address definition is a numeric label assigned to
devices that use the internet to communicate. Computers that communicate over the
internet or via local networks share information to a specific location using IP addresses.
An IP address works in helping your device, whatever you are accessing the internet on,
to find whatever data or content is located to allow for retrieval.
Common tasks for an IP address include both the identification of a host or a network, or
identifying the location of a device. An IP address is not random. The creation of an IP
address has the basis of math. The Internet Assigned Numbers Authority (IANA)
allocates the IP address and its creation. The full range of IP addresses can go from
0.0.0.0 to 255.255.255.255.
Public ip address
Private IP address
Static IP address
Dynamic IP address
IP Address Classes
Some IP addresses are reserved by the Internet Assigned Numbers Authority (IANA).
These are typically reserved for networks that carry a specific purpose on
the Transmission Control Protocol/Internet Protocol (TCP/IP), which is used to
interconnect devices. Four of these IP address classes include:
1. 0.0.0.0: This IP address in IPv4 is also known as the default network. It is the
non-routeable meta address that designates an invalid, non-applicable, or
unknown network target.
2. 127.0.0.1: This IP address is known as the loopback address, which a computer
uses to identify itself regardless of whether it has been assigned an IP address.
3. 169.254.0.1 to 169.254.254.254: A range of addresses that are automatically
assigned if a computer is unsuccessful in an attempt to receive an address from
the DHCP.
4. 255.255.255.255: An address dedicated to messages that need to be sent to
every computer on a network or broadcasted across a network.
The router on a TCP/IP network can be configured to ensure it recognizes subnets, then
route the traffic onto the appropriate network. IP addresses are reserved for the following
subnets:
To address this problem, IPv6 was introduced. This new standard operates a
hexadecimal format that means billions of unique IP addresses can now be created. As
a result, the IPv4 system that could support up to around 4.3 billion unique numbers has
been replaced by an alternative that, theoretically, offers unlimited IP addresses.
That is because an IPv6 IP address consists of eight groups that contain four
hexadecimal digits, which use 16 distinct symbols of 0 to 9 followed by A to F to
represent values of 10 to 15.
- What file systems are supported by Windows Server? Explain the differences between NTFS and
ReFS.
9. **Storage Management:**
#### Security
- Give examples of common settings that can be controlled through Group Policy.
- How do you perform a backup in Windows Server? Explain the use of Windows Server Backup.
- What tools are available in Windows Server for monitoring performance? Explain the use of Task
Manager and Performance Monitor.
1. **Components:**
- What are the main components of a computer system? Explain the role of each component (CPU,
RAM, Motherboard, etc.).
- Explain the differences between various types of memory (RAM, ROM, Cache).
#### Storage
3. **Storage Devices:**
- What are the different types of storage devices? Explain the differences between HDDs, SSDs, and
NVMe drives.
4. **Storage Interfaces:**
- What are the common storage interfaces used in servers (SATA, SAS, NVMe)?
7. **Power Supply:**
8. **Cooling Solutions:**
- What are the different types of cooling solutions (air, liquid, passive)?
9. **Expansion Cards:**
- Give examples of common expansion cards used in servers (graphics cards, RAID controllers).
- What are the different types of ports and connectors found on servers? Explain the purpose of
USB, HDMI, Ethernet, and other ports.
1. Local Network:
2. Private Network:
Port Numbers:
Port Number: 22
Used for secure remote access and administration of a device.
Port Number: 23
Used for unencrypted remote terminal access.
Port Number: 25
Used for sending email messages between servers.
Port Number: 53
Used for translating domain names to IP addresses and vice
versa.
Port Number: 80
Used for transmitting web pages and other web resources on
the World Wide Web.
- Demonstrate the installation and configuration of a role on Windows Server (e.g., DNS or DHCP
server).
- Show how to set up a basic Active Directory environment, including creating users and groups.
- Perform a simple hardware upgrade on a server, such as adding RAM or installing a new hard drive.
By preparing answers and practicing these topics, you'll be well-equipped for your viva on Windows
Server fundamentals and computer hardware. Good luck!
OSI MODEL:
1) Physical Layer
2) Data Link Layer
3) Network Layer
4) Transport Layer
5) Session Layer
6) Presentation Layer
7) Application Layer
What is Vmware :
Virtualization software creates an abstraction layer over computer
hardware that allows the hardware elements of a single computer—
processors, memory, storage, and more—to be divided into multiple
virtual computers, commonly called virtual machines (VMs).
What is a host?
A host is a computer or other device that communicates with other hosts on
a network. Also known as network hosts, hosts include clients and
servers that send or receive data, services and applications.
What is subnetting
DHCP:
A DHCP (Dynamic Host Configuration Protocol) server is a network server
that automatically assigns IP addresses and other network configuration
information to devices (such as computers, smartphones, and printers)
that connect to a network. Here's an overview of how DHCP servers work
and their key features:
1. **What is Cybersecurity?**
1. Update your software and operating system: This means you benefit from the
latest security patches.
2. Use anti-virus software: Security solutions like Kaspersky Total Security will detect
and removes threats. Keep your software updated for the best level of protection.
3. Use strong passwords: Ensure your passwords are not easily guessable.
4. Do not open email attachments from unknown senders: These could be
infected with malware.
5. Do not click on links in emails from unknown senders or unfamiliar
websites:This is a common way that malware is spread.
6. Avoid using unsecure WiFi networks in public places: Unsecure networks leave
you vulnerable to man-in-the-middle attacks.
- What are the main goals of cybersecurity (CIA Triad: Confidentiality, Integrity, Availability)?
- What are the different types of cyber threats? Provide examples of each.
SQL injection
An SQL (structured language query) injection is a type of cyber-attack used to take
control of and steal data from a database. Cybercriminals exploit vulnerabilities in
data-driven applications to insert malicious code into a databased via a malicious
SQL statement. This gives them access to the sensitive information contained in the
database.
Denial-of-service attack
A denial-of-service attack is where cybercriminals prevent a computer system from
fulfilling legitimate requests by overwhelming the networks and servers with traffic.
This renders the system unusable, preventing an organization from carrying out vital
functions.
Authentication:
Authorization:
Factors of Authentication:
Authentication Workflow:
1. Encryption Process:
Symmetric Encryption:
Asymmetric Encryption:
6. **Firewalls:**
1. Hardware Firewall:
Form Factor: A hardware firewall is a standalone physical
device, typically implemented as a dedicated network
appliance.
Deployment: Hardware firewalls are deployed at the network
perimeter, between the internal network and the external
network (such as the Internet).
Functionality: Hardware firewalls provide network-level
filtering and protection by inspecting incoming and outgoing
traffic at the packet level.
Performance: Hardware firewalls are designed to handle
high volumes of network traffic efficiently and can offer
superior performance compared to software firewalls in terms
of throughput and scalability.
Security Features: Hardware firewalls may include
advanced security features such as stateful packet inspection,
intrusion detection and prevention, VPN support, deep packet
inspection, and high availability (redundancy and failover).
2. Software Firewall:
Form Factor: A software firewall is a piece of software that
runs on a computer or server, serving as a security application
installed on the operating system.
Deployment: Software firewalls are deployed on individual
computers or servers, providing host-based protection for
specific devices or endpoints.
Functionality: Software firewalls monitor and control
network traffic at the application layer of the OSI model,
allowing for more granular control and visibility into individual
applications and processes running on the host.
Performance: Software firewalls may consume system
resources (CPU, memory) and can potentially impact the
performance of the host system, especially if running on
resource-constrained devices.
Security Features: Software firewalls offer a range of
security features, including inbound and outbound traffic
filtering, application control, port blocking, logging and
reporting, and customizable security policies.
- What is an Intrusion Detection System (IDS)? How does it differ from an Intrusion Prevention
System (IPS)?
8. **Risk Assessment:**
2. Identify Assets:
4. Assess Risks:
5. Quantify Risks:
6. Prioritize Risks:
9. **Security Policies:**
- What are cybersecurity frameworks? Give examples (e.g., NIST, ISO/IEC 27001).
- Describe a well-known cyber attack (e.g., the WannaCry ransomware attack) and its impact.
- What lessons can be learned from major data breaches (e.g., Equifax, Target)?
- What are some best practices for individuals to protect themselves online?
- What are some emerging trends in cybersecurity (e.g., AI in cybersecurity, quantum encryption)?
By preparing answers and practicing these topics, you'll be well-equipped for your viva on the basic
concepts of cybersecurity. Good luck!