Kuk Linux 2023

Kuk Linux 2023

Kuk Linux 2023

Q8(a) :-What is difference between linux OS and Windows OS? Why Linux is considered more advanced and secure than windows.

Difference between Linux OS and Windows OS

Architecture and Design
  1. Kernel Type:

    • Linux: Uses a monolithic kernel, where the entire operating system runs in kernel space. It combines the kernel with other operating system components like device drivers and file system management.
    •  
    • Windows: Uses a hybrid kernel, combining aspects of monolithic and microkernel architectures. It has a core kernel with modular services running in both user space and kernel space.
    •  
  2. File System:

    • Linux: Supports various file systems such as ext3, ext4, XFS, Btrfs, and more. It treats everything as a file, including hardware devices.
    •  
    • Windows: Primarily uses NTFS (New Technology File System) but also supports FAT32 and exFAT.
    •  
  3. User Interface:

    • Linux: Offers a variety of desktop environments (e.g., GNOME, KDE, XFCE) and is highly customizable. It also provides powerful command-line interfaces.
    •  
    • Windows: Uses a consistent graphical user interface (GUI) with the Windows Shell and File Explorer. The command-line interface (CMD or PowerShell) is less emphasized for everyday use compared to Linux.
    •  
  4. Package Management:

    • Linux: Uses package managers like APT (Debian/Ubuntu), YUM/DNF (Red Hat/Fedora), and Pacman (Arch Linux) for software installation and updates.
    •  
    • Windows: Software is generally installed via executable files (.exe) or installers. The Microsoft Store and package managers like Chocolatey are available but less prevalent.
    •  
  5. Open Source vs. Proprietary:

    • Linux: Most distributions are open source, with source code freely available and modifiable by anyone.
    •  
    • Windows: Closed source and proprietary, developed and maintained solely by Microsoft.
Security
  1. User Privileges:

    • Linux: Strong emphasis on user permissions and root access. Users operate as non-administrators by default, reducing the risk of system-wide changes and malware.
    •  
    • Windows: Historically, users often operated with administrative privileges, though modern versions encourage using standard user accounts and employ User Account Control (UAC) to mitigate risks.
    •  
  2. Vulnerability Management:

    • Linux: Open-source nature allows for rapid detection and patching of vulnerabilities by the global community. Diverse distributions reduce the impact of a single vulnerability.
    •  
    • Windows: Centralized updates from Microsoft. While effective, it relies on timely patch releases from a single source.
    •  
  3. Attack Surface:

    • Linux: Generally has a smaller attack surface due to lower market share and targeted attacks. Servers running Linux often employ hardened security measures.
    •  
    • Windows: Larger attack surface due to widespread use, especially in desktop environments. More attractive target for malware and cyber-attacks.
    •  
  4. Security Features:

    • Linux: Includes features like SELinux (Security-Enhanced Linux), AppArmor, and various firewall tools (e.g., iptables, firewalld).
    •  
    • Windows: Includes features like Windows Defender, BitLocker, and built-in firewalls.
Customization and Control
  1. Linux: Highly customizable with the ability to modify the source code, change the desktop environment, and use different shells. Ideal for users who want full control over their operating system.
  2. Windows: Customizable within the limits of provided options. Less flexible in terms of deep system modifications and configurations compared to Linux.

Why Linux is Considered More Advanced and Secure

  1. Open Source Nature:

    • Continuous peer review and contributions from a global community lead to quick identification and resolution of issues.
    • Transparency ensures that malicious code is harder to hide.
    •  
  2. User Privileges and Root Access:

    • Emphasis on operating as non-root users by default minimizes the risk of system-wide impacts from malware and user errors.
    •  
  3. Diverse Ecosystem:

    • The variety of distributions (distros) allows users to select or build a system tailored to their security needs.
    • Specialized distros (e.g., Tails, Kali Linux) focus on privacy, security, and penetration testing.
    •  
  4. Security Tools:

    • Built-in security modules like SELinux and AppArmor enforce mandatory access controls and policy-based security.
    • Advanced firewall configurations and networking tools are available for robust security setups.
    •  
  5. Faster Patch Management:

    • The collaborative nature of open-source projects often results in faster identification and patching of vulnerabilities.
    •  
  6. Less Targeted by Malware:

    • Lower desktop market share compared to Windows means fewer malware authors target Linux. However, Linux servers are a popular target, so security practices are stringent.

Q8(b) :- Write the uses of telnet and ftp server. Write the commands to start, stop and status to check the status of ftp server.

Uses of Telnet and FTP Server

Telnet

Telnet is a network protocol used to provide a command-line interface for communication with a remote device or server. It is used for:

  1. Remote Administration: Allows administrators to log in to remote devices and manage them as if they were physically present.
  2. Debugging and Testing: Useful for network debugging, testing server services, and port connectivity.
  3. Access to Legacy Systems: Used to connect to older systems and devices that do not support modern secure protocols like SSH.
FTP Server

FTP (File Transfer Protocol) servers are used for transferring files between a client and a server over a network. The uses include:

  1. File Sharing: Facilitates the transfer of files between computers, useful for collaborative work environments.
  2. Website Management: Web developers use FTP to upload and download files to and from web servers.
  3. Data Backup: Automated scripts can upload backups to an FTP server for secure storage.

Commands to Start, Stop, and Check Status of FTP Server

The commands to manage an FTP server can vary depending on the FTP server software (like vsftpd, ProFTPD, or pure-ftpd) and the Linux distribution. Here, we’ll use vsftpd (Very Secure FTP Daemon) as an example.

Using systemd

1. Start the FTP server:

sudo systemctl start vsftpd
  • 2. Stop the FTP server:
sudo systemctl stop vsftpd
  • 3. Check the status of the FTP server:

sudo systemctl status vsftpd

Q8(c) :-What is job scheduling and write the syntax to set job scheduling using at and crontab command to ceate directory after 10 minute and 10/5/2023 at 9:30 run.

  • Job scheduling in Linux is a method to automate tasks by scheduling them to run at specific times or intervals. It is essential for system administration, maintenance, and automation of repetitive tasks. The two primary tools for job scheduling in Linux are cron and at.

    Cron

    Cron is a time-based job scheduler in Unix-like operating systems. It is used for scheduling repetitive tasks to be executed at fixed times, dates, or intervals. Cron jobs are defined in a crontab file, which can be user-specific or system-wide.

 

At

The at command is used for scheduling one-time tasks. Unlike cron, it doesn’t require editing a file but takes the time and command directly.

To create a directory named new_directory exactly 10 minutes from now using At:

echo “mkdir ~/new_directory” | at now + 10 minutes

To schedule a command to run on October 5, 2023, at 9:30 AM using At:

echo “mkdir ~/scheduled_directory” | at 9:30 AM 10/05/2023

To add a cron job that creates a directory exactly 10 minutes from now  using Cron:

  1. Determine the current time and calculate 10 minutes from now.
  2. Add a cron job using a single command:
(crontab -l; echo “$(date -d ’10 minutes’ ‘+%M %H’) * * * mkdir ~/new_directory”) | crontab –

To add a cron job that runs a command on October 5, 2023, at 9:30 AM using cron:

(crontab -l; echo “30 9 5 10 * mkdir ~/scheduled_directory”) | crontab –
Scroll to Top