SA 401 — Reviewer for Prelims

Introduction to System Administration

System Administration refers to the management, configuration, and operation of computer systems and networks. Referred to as "sysadmins," are responsible for setting up and maintaining servers, desktops, and sometimes even network devices such as routers and switches.

Key Roles and Responsibilities of System Administrators

  • Server Management: This involves installing, configuring, updating, and maintaining servers, whether they're on-premises or in the cloud.
  • Network Management: Monitoring and controlling the network to ensure that data flows reliably and securely between devices.
  • User Management: Setting up user accounts, permissions; ensuring that only authorized individuals can access specific resources.
  • Security: Implementing security policies, managing firewalls, monitoring for security breaches, and addressing vulnerabilities.
  • Backup and Recovery: Regularly backing up data to prevent loss and ensuring systems can be quickly restored after any disruptions.
  • Performance Monitoring: Keeping an eye on system performance, resolving bottlenecks, and ensuring optimal operation.
  • Software Installation and Updates: Ensuring all systems are equipped with the necessary software and that this software remains up-to-date.

Importance of System Maintenance

Maintenance is a crucial aspect of system administration. As with any machinery or equipment, regular checks and updates are essential to keep computer systems running smoothly.
  • Proactive Problem Identification: Regular maintenance helps in identifying and rectifying potential issues before they become critical.
  • Optimized Performance: Over time, systems can become cluttered or fragmented. Regular maintenance ensures systems run at their peak performance.
  • Security: With the ever-evolving landscape of threats, maintaining systems means regularly patching and updating software to guard against vulnerabilities.
  • Data Integrity: Regular backups and checks ensure data integrity and availability.
System Administrator, often referred to as a “sysadmin”, is a professional responsible for managing and maintaining computer systems and networks within an organization.

Types of System Administrator

  1. Network Administrator specializes in managing and maintaining the organization's network infrastructure, including routers, switches, and network protocols.
  2. Systems Administrator responsible for the installation, configuration, and maintenance of operating systems, software applications, and hardware devices
  3. Database Administrator (DBA) focuses on managing and maintaining databases, including installation, configuration, performance tuning, backup and recovery, and ensuring data integrity and security.
  4. Security Administrator concentrates on implementing and maintaining security measures to protect the organization's systems and data. They manage firewalls, intrusion detection systems, and access controls, and develop security policies and procedures.
  5. Cloud Administrator specializes in managing and maintaining cloud-based infrastructure, such as virtual machines, storage, and networking services provided by cloud service providers like Amazon Web Services (AWS) or Microsoft Azure.
  6. Web Administrator manages and maintains web servers, web applications, and related services. They handle tasks like website deployment, performance optimization, security, and managing user access.

Ethical Considerations in System Administration

  • Privacy and Confidentiality
  • Transparency and Accountability:
  • Integrity
  • Competence
  • Availability
  • Respect for Policies and Laws
  • Neutrality
  • Responsibility to Report
  • Respect for Users
  • Continuous Improvement

Introduction to Operating Systems

An operating system is a crucial component in computing. It serves as an intermediary between computer hardware and the computer user, providing a user-friendly environment and controlling the computer hardware so that software can function.

Key Roles of an Operating System

  • Processor Management: The OS manages the CPU, deciding which processes get processed when and for how long, ensuring optimized usage of CPU.
  • Memory Management: The OS is responsible for managing the computer's memory, which includes the system's RAM and cache memory.
  • Device Management: The OS manages device communication via their respective drivers. Devices can include hard drives, printers, displays, etc.
  • Storage Management: It controls the permanent storage operations, like reading/writing onto disks.
  • Security and Access Control: The OS maintains the security of information stored in the system through account passwords and similar measures. It also defines authorization levels to determine who can access what on the system.
  • User Interface: Most modern OS offer Graphical User Interfaces (GUIs) that include a set of commands for user communication.

Popular Operating Systems

  1. Microsoft Windows
    1. Invented by: Microsoft Corporation
    2. Date: Windows 1.0 was released on November 20, 1985. However, it's worth noting that there have been many versions of Windows released since then.
  2. Mac OS (originally System Software)
    1. Invented by: Apple Inc., with key figures like Steve Jobs and Steve Wozniak being involved in Apple's early days.
    Date: The original Macintosh System Software was introduced in 1984 with the release of the Apple Macintosh computer.
  3. Linux
    1. Invented by: Linus Torvalds
    Date: The first version (0.01) of the Linux kernel was released on September 17, 1991. Linux distributions combine this kernel with other software to create complete OS packages.
  4. Unix
    1. Invented by: Ken Thompson, Dennis Ritchie, and others at AT&T Bell Labs
    Date: First released in 1971.
  5. Android
    1. Invented by: Android Inc., which was later acquired by Google. Key figures include Andy Rubin, Rich Miner, Nick Sears, and Chris White.
    2. Date: Android was unveiled in 2007, but the first official Android device, the HTC Dream, was released in September 2008.

Operating System Layers

  1. Kernel: Core part of an OS, it interacts directly with hardware, offering basic services for all other parts of the OS.
  2. Shell: Interface between the user and the kernel, allowing users to request specific operations from the OS.
  3. Applications: End-user software, interacting with the OS through system calls.

File Permission and Ownership in Linux

Ownership

Every file and directory in Linux have an associated owner and a group.
  • Owner: This is the user who has rights to change the permissions of the file and by default can read, write, and execute the file (depending on the file's default permissions). The owner is usually the user who created the file.
  • Group: Every user in Linux belongs to one or more groups. Files can be associated with a group, which means that users who belong to the file's group will have the same group permissions to the file.
-rw-r—r– 1 alice users 1000 Jan 1 12:00 example.txt*
*In the above example, the owner of the file example.txt is alice and the group is users.

Permissions

File permissions in Linux determine who can read, write, or execute a file or directory.
There are 3 types of permissions:
  • Read (r): Allows the file to be read.
  • Write (w): Allows the file to be written to or modified.
  • Execute (x): Allows the file to be executed (if it's a program or script).
Permissions are set for three different categories:
  • User (u): The owner of the file.
  • Group (g): Users who are members of the file's group.
  • Others (o): Everyone else.
-rw-r—r– 1 alice users 1000 Jan 1 12:00 example.txt*
*User (owner): rw- (read and write permission) | Group: r-- (read-only permission) | Others: r-- (read-only permission)

Changing Ownership

To change the owner and group of a file, you can use the chown command: chown newowner:newgroup filename
Symbolic Mode:
  • Add permission: chmod u+x filename
  • Remove permission: chmod u-x filename
  • Set permission: chmod u=x filename
Absolute Mode:
Permissions are represented as numbers
  • Read = 4
  • Write = 2
  • Execute = 1
**NOTE: If you want to set a file to have read, write, and execute permissions for the owner, read and execute for the group, and read-only for others, you'd use: chmod 751 filename

Basic Terminal Commands in Linux

Terminal is a command line interface (CLI) or shell, provides a direct way to interact with the operating system through textual commands, rather than graphical user interfaces (GUIs).
Why use the Terminal?
  • Efficiency: Once familiar with the commands, users can perform operations much faster than with GUIs.
  • Scripting: Terminal commands can be combined into scripts to automate repetitive tasks.
  • Remote Access: Remote management of systems is often done via SSH (Secure Shell) in a terminal. GUIs may not be available or feasible in many remote settings.

Basic Commands and their Functions

  • pwd: Stands for "print working directory." It shows the current directory you're in.
  • ls: Lists the files in the current directory. Variations like ls -l provide detailed views, while ls -a displays hidden files.
  • cd: Changes directories. For example, cd Documents would move you to the Documents directory.
  • touch: Creates an empty file. E.g., touch newfile.txt would create an empty file named newfile.txt.
  • mkdir: Creates a directory. E.g., mkdir newdir would create a new directory named newdir.

Intermediate Commands

  • grep: Searches for specific text within files. For example, grep "hello" myfile.txt searches for the word "hello" in myfile.txt.
  • find: Searches for files in the directory hierarchy. E.g., find . -name "myfile.txt" searches for files named myfile.txt starting from the current directory (.) and traversing all subdirectories.
  • man: Provides a manual or help file for a command. E.g., man ls provides details about the ls command.

Redirection and Pipeline

  • > and >>: These symbols are used to redirect output. For example, echo "hello" > myfile.txt would write "hello" to myfile.txt. Using >> would append to the file rather than overwriting it.
  • |: This is the pipe symbol. It takes the output of one command and uses it as the input for another. E.g., ls | grep "txt" would list files in the current directory and then search the list for lines containing "txt".

Environment Variables

  • echo: Prints to the terminal. When used with a $, it can print environment variables. E.g., echo $PATH shows the directories the system searches for executable files.
  • export: Sets a new environment variable or modifies an existing one.
These are just the basics, and there's a lot more to explore. Remember, the terminal is a powerful tool, but with great power comes great responsibility. It's easy to make mistakes, especially with commands that modify or delete files, so always double-check your commands before executing them.