How to Create Swap Files, Copy Disks, and Backup Linux Disks

Use the dd command for creating swap files, copying disks, backup linux disks..and more. The dd command on Linux is powerful for cloning disks or creating backups. Learn about dd and how to use dd with this tutorial.

00:00 What is dd?
01:00 What does dd stand for?
01:40 Using the dd command
03:18 Creating a Swap File
04:33 Cloning disks
06:00 Use cases for dd
07:35 Disk Destroyer??

#linux  #command  #tutorial 

What is GEEK

Buddha Community

How to Create Swap Files, Copy Disks, and Backup Linux Disks

I am Developer

1620616862

How to Delete Directories and Files in Linux using Command Line

In this remove or delete directories and files linux tutorial guide, you will learn how to remove empty directory and non empty directory linux using command line. And as well as how to remove/file files linux using command line.

If you work with Linux then you will need the following:

  • how to remove empty directory in linux,
  • how to remove non empty directory,
  • how to remove directory without confirmation linux
  • how to remove files with and without confirmation in linux.

So, this tutorial guide will show you you how to use the rmunlink, and rmdir commands to remove or delete files and directories in Linux with and without confirmation.

https://www.tutsmake.com/how-to-remove-directories-and-files-using-linux-command-line/

#how to delete directory in linux #how to remove non empty directory in linux #remove all files in a directory linux #linux delete all files in current directory #linux delete all files in a directory recursively #delete all files in a directory linux

Create a Linux Swap File

How to add Swap File

Follow these steps to add 1GB of swap to your server. If you want to add 2GB instead of 1 GB, replace 1G with 2G.

  1. Create a file that will be used for swap:
sudo fallocate -l 1G /swapfile
  1. If faillocate is not installed or if you get an error message saying fallocate failed: Operation not supported then you can use the following command to create the swap file:
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
  1. Only the root user should be able to write and read the swap file. To set the correct permissions type:
sudo chmod 600 /swapfile
  1. Use the mkswap utility to set up the file as Linux swap area:
sudo mkswap /swapfile
  1. Enable the swap with the following command:
sudo swapon /swapfile
  1. To make the change permanent open the /etc/fstab file and append the following line:
  2. /etc/fstab
/swapfile swap swap defaults 0 0
  1. Copy
  2. To verify that the swap is active, use either the swapon or the [free](https://linuxize.com/post/free-command-in-linux/) command as shown below:
sudo swapon --show
NAME      TYPE  SIZE   USED PRIO
/swapfile file 1024M 507.4M   -1
sudo free -h
              total        used        free      shared  buff/cache   available
Mem:           488M        158M         83M        2.3M        246M        217M
Swap:          1.0G        506M        517M

How to adjust the swappiness value

Swappiness is a Linux kernel property that defines how often the system will use the swap space. Swappiness can have a value between 0 and 100. A low value will make the kernel to try to avoid swapping whenever possible, while a higher value will make the kernel to use the swap space more aggressively.

The default swappiness value is 60. You can check the current swappiness value by typing the following command:

cat /proc/sys/vm/swappiness

#linux #linux swap file

How to Create Swap Files, Copy Disks, and Backup Linux Disks

Use the dd command for creating swap files, copying disks, backup linux disks..and more. The dd command on Linux is powerful for cloning disks or creating backups. Learn about dd and how to use dd with this tutorial.

00:00 What is dd?
01:00 What does dd stand for?
01:40 Using the dd command
03:18 Creating a Swap File
04:33 Cloning disks
06:00 Use cases for dd
07:35 Disk Destroyer??

#linux  #command  #tutorial 

Hire Dedicated Linux Developer

Looking to develop real-time applications?

Hire Dedicated Linux Developer from HourlyDeveloper.io, we have dedicated developers who have vast experience in developing applications for Linux and UNIX operating systems and have in-depth knowledge of their processes, kernel tools, internal architectures, and development packages.

Consult with experts:- https://bit.ly/2ZQ5ySP

#hire linux dedicated developer #linux developer #linux development company #linux development services #linux development #linux developer

How I Switched from Windows 10 to Linux Mint

This article is all about my journey on switching from Windows 10 to Linux Mint 20, how I got easily adapted to the Linux environment, and some resources that helped me to set up a perfect Desktop environment.

Uncertainty

Ok, now I have decided to switch to Linux but here comes the first question. Which distro will satisfy my needs both in terms of GUI and other aspects? Linux is not something new to me since I have been working with RHEL based distros in my work for the past 4 years with the command-line.

I know RHEL based distros are good for enterprises but not for personalized desktop environments, at least that’s what I am thinking till now. So I started my research to find the distro that should be easy for me to use and at the same time should have good community support if in case I ran into some problem. Among many Linux distros, I drilled down my list to 4 flavors.

Related ArticleThe Best Linux Distributions for Beginners

Before deciding the Distro it is necessary you formulate the list of tools/programs or packages needed and check if the distro you choose provides all those features.

For me, I use Linux for two main purposes: one is for my professional development work, writing articles, and second for my personal use like Video editing and Movies. Most of the popular software are created to be compatible with Windows, macOS, and Linux like Sublime TextVSCodeVLC Media PlayerFirefox/Chromium browser. Other than these software, cloud-based services make our life easy Like Microsoft Office 365 or G Suite.

#linux distros #linux mint #linux distros #linux mint tips #linux