Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [HJ_xman@localhost ~]$ free -m
- total used free shared buff/cache available
- Mem: 4926 873 2043 15 2009 3803
- Swap: 2462 0 2462
- [HJ_xman@localhost ~]$ swapon -s
- Filename Type Size Used Priority
- /dev/zram0 partition 2522108 0 100
- [HJ_xman@localhost ~]$ dd if=/dev/zero of=/swap_file bs=1G count=1
- dd: failed to open '/swap_file': Permission denied
- [HJ_xman@localhost ~]$ sudo dd if=/dev/zero of=/swap_file bs=1G count=1
- [sudo] password for HJ_xman:
- 1+0 records in
- 1+0 records out
- 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.68649 s, 291 MB/s
- [HJ_xman@localhost ~]$ chmod 600 /swap_file
- chmod: changing permissions of '/swap_file': Operation not permitted
- [HJ_xman@localhost ~]$ sudo chmod 600 /swap_file
- [HJ_xman@localhost ~]$ mkswap /swap_file
- mkswap: cannot open /swap_file: Permission denied
- [HJ_xman@localhost ~]$ sudo mkswap /swap_file
- Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
- no label, UUID=62d068fc-03d8-4981-9d67-244e9831d5a8
- [HJ_xman@localhost ~]$ cat /etc/fstab
- #
- # /etc/fstab
- # Created by anaconda on Wed Mar 31 06:42:17 2021
- #
- # Accessible filesystems, by reference, are maintained under '/dev/disk/'.
- # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
- #
- # After editing this file, run 'systemctl daemon-reload' to update systemd
- # units generated from this file.
- #
- UUID=9a6209be-1b02-4cc6-a2fa-f4adeecd266f / btrfs subvol=root 0 0
- UUID=a008e035-a35c-431f-93da-b0206361e436 /boot ext4 defaults 1 2
- UUID=9a6209be-1b02-4cc6-a2fa-f4adeecd266f /home btrfs subvol=home 0 0
- /swap_file swap swap defaults 0 0
- [HJ_xman@localhost ~]$ swapon /swap_file
- swapon: cannot open /swap_file: Permission denied
- [HJ_xman@localhost ~]$ sudo swapon /swap_file
- swapon: /swap_file: swapon failed: Invalid argument
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement