Skip to main content

Posts

Showing posts from January, 2024

Very Secure FTP

  VsFTPd (Very Secure FTP Daemon) is a secure and fast FTP server for Linux systems. It supports both anonymous and authenticated FTP access and can be configured for high performance and security. To install and configure VsFTPd on Fedora, you can follow these steps: Update your system packages with the command: sudo dnf update Install VsFTPd with the command: sudo dnf install vsftpd Edit the configuration file /etc/vsftpd/vsftpd.conf with a text editor of your choice. You can use sudo nano /etc/vsftpd/vsftpd.conf for example. Set the basic configuration options, such as disabling anonymous login ( anonymous_enable=NO ), enabling local user login ( local_enable=YES ), and permitting write operations ( write_enable=YES ). Optionally, configure user isolation by adding chroot_local_user=YES to the configuration file. This will restrict users to their home directory. Allow FTP traffic through the firewall with the commands: sudo firewall-cmd --zone=public --add-service=ftp --perma...

How to Set Up and Use NFS on Linux

  NFS (Network File System) is a Linux feature that allows you to share files and directories between computers and servers on a network. NFS is useful for saving disk space, simplifying file management, and providing centralized access to data. In this blog post, we will show you how to set up and use NFS on Linux, using Ubuntu and Fedora as examples. Installing NFS Packages To use NFS, you need to install the NFS packages on both the server and the client machines. The server is the machine that hosts the files and directories that you want to share, and the client is the machine that connects to the server to access or upload files. On Ubuntu, Linux Mint, and other Debian-based distros, you can install the NFS packages with the following command: $ sudo apt install nfs-kernel-server nfs-common On Fedora, CentOS, AlmaLinux, and other RHEL-based distros, you can install the NFS packages with the following command: $ sudo dnf install nfs-utils Creating and Exporting NFS Shares Afte...

Backup and Restore in Linux

  Linux is a popular operating system that powers many servers, desktops, and embedded devices. Linux users often need to back up their data and restore it in case of any data loss or corruption. There are several tools and commands in Linux that can help users perform backup and restore operations. In this blog post, we will cover some of the most common backup and restore commands in Linux, such as tar, gzip, bzip2, dump, and restore. We will also show some examples of how to use these commands to create and extract backups. What is backup and restore? Backup and restore are two processes that involve copying and recovering data from one location to another. Backup is the process of creating a copy of data that can be used to restore the original data in case of any data loss or corruption. Restore is the process of recovering the original data from the backup copy. Backup and restore are essential for ensuring the safety and security of important files and data. Losing data can ...

GRUB in Linux

  GRUB (also known as GNU GRUB or GNU Grand Unified Bootloader) is a bootloader and boot manager for Linux and other Unix-based OSes. GRUB starts after BIOS finishes the necessary hardware tests and loads it from the Master Boot Record (MBR). Once loaded, GRUB takes control of the system and loads the Linux kernel. In this post, we will explore the following topics: When does GRUB come into picture in boot loading? What are the edit options and how to use them? Additional information When does GRUB come into picture in boot loading? As mentioned earlier, GRUB is the first program that runs after the BIOS. GRUB is responsible for finding and loading the kernel image and the initial RAM disk (initrd) image, which contain the drivers and modules needed by the kernel. GRUB also allows the user to choose between different operating systems, if there is more than one on the system. GRUB consists of two stages: the first stage is stored in the boot sector, and the second stage is stored i...

Booting Procedure in Linux

  Explore Linux is a popular operating system that runs on a variety of devices, from desktops and laptops to servers and embedded systems. But how does Linux start up and load the operating system? In this post, we will explore the six stages of the Linux booting process, from the moment you turn on your device to the moment you see the login prompt. 1. BIOS BIOS stands for Basic Input/Output System, and it is the first program that runs when you power on your device. BIOS is stored in a ROM chip on the motherboard, and it is responsible for initializing the hardware components and peripherals, such as the keyboard, display, disk drives, and serial communications. BIOS also performs a power-on self-test (POST) to check the integrity and functionality of the hardware. After the POST, BIOS looks for a bootable device, such as a hard drive, a USB drive, or a CD-ROM, depending on the boot order configured in the BIOS settings. BIOS then reads the first sector of the boot device, which...

How to Create and Manage Swap Partition in Linux

  Swap partition is a space on your hard disk that serves as overflow for your RAM. It can help you run more applications, prioritize data, and hibernate your system. In this article, we will explain how to create, size, and manage a swap partition in Linux with practical examples. How to Create the Swap Partition To create a swap partition, you need to have some free space on your hard disk. You can use a tool like fdisk or gparted to create a new partition or resize an existing one. For this example, we will use fdisk to create a new swap partition of 2 GB on /dev/sda . First, run sudo fdisk /dev/sda to enter the interactive mode of fdisk . You will see a prompt like this: Command (m for help): Type m to see the list of available commands. You will see something like this: Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add...

Linux Volume Management (LVM) - A Comprehensive Guide

  Introduction Linux Volume Management (LVM) is a device mapper framework provided by the Linux kernel. It allows you to manage disk drives and similar mass-storage devices, in particular large ones. The term “volume” refers to a disk drive or partition thereof. Why Use LVM? LVM provides a layer of abstraction between your operating system and the physical disks. This abstraction makes it easier to manage disk space. If a file system needs more space, it can be added to its logical volume from the free spaces in its volume group and the file system can be re-sized as we wish. Key Concepts Physical Volume (PV): These are your actual disks. Volume Group (VG): This is a pool of disk space that consists of one or more PVs. Logical Volume (LV): This is a portion of a VG that has been allocated for a particular purpose. You can think of an LV as a partition. LVM Workflow Create Physical Volumes: The first step in creating an LVM is to create a physical volume. This can be done using ...

Understanding Linux Partitions, Fdisk, and Mounting

   1. Partitions in Linux A partition is a segment of a storage device that has been logically separated from the rest of the device. All the partitions can be managed as if they are separate storage devices.   Types of Partitions There are three different types of partitions in Linux: - **Primary**: Holds the operating system files. Only four primary partitions can be created. - **Extended**: A special type of partition in which more than the four primary partitions can be created. - **Logical**: Subdivisions of an extended partition.  Examples A standard partition scheme for a home Linux install is as follows: - A 12-20 GB partition for the OS, mounted as `/` (called "root"). - A smaller partition used to augment your RAM, referred to as swap. - A larger partition for personal use, mounted as `/home`.  2. Fdisk Utility Fdisk stands for "fixed disk or format disk and is a command-line based disk manipulation utility for Linux/Unix systems⁶. With the help o...

A Comprehensive Overview of Cron Jobs

  Cron is a powerful utility in Unix-like operating systems used to schedule commands  to run at specific times. These scheduled commands, known as “Cron Jobs”, are  essential for automating tasks and maintaining system health.  For a more detailed guide, you can refer to this informative article on    OSTechNix.

Understanding Systemctl and Firewall-cmd: A Comprehensive Guide

  In this blog post, we will delve into two powerful command-line tools used in Linux systems: `systemctl` and ` firewall-cmd` . We will explore their functionalities, flags, and provide examples to illustrate their usage. ## Systemctl: Controlling systemd Services `systemctl` is a command-line utility that allows you to control the `systemd` system and service manager¹². `systemd` is the first process that gets started during bootup (with PID 1) and it's responsible for bringing the Linux host up to the state where it can be used². ### Flags and Usage Here are some commonly used flags with `systemctl`: - `start [service]`: Starts a service¹. - `stop [service]`: Stops a service¹. - `restart [service]`: Restarts a service¹. - `reload [service]`: Reloads a service configuration¹. - `enable [service]`: Enables a service to start at boot¹. - `disable [service]`: Disables a service from starting at boot¹. - `status [service]`: Checks the status of a service¹. - `list-units --type=servic...