Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 1.08 KB

basic.md

File metadata and controls

68 lines (50 loc) · 1.08 KB

part of basic

make a hard disk partition

/var /opt /boot /swap(size is always same as memmory's)

format disk and mount

check disk

  lsblk
  fdisk /dev/sdb1

make fs

  mkfs.ext4 /dev/sdb1

mount disk

  mount /dev/sdb1 /data

modify fs tab

  vim /etc/fstab

the fstab file is as below

  # <device>             <dir>         <type>    <options>             <dump> <fsck>
  /dev/sda1              /             ext4      defaults,noatime      0      1
  /dev/sda2              none          swap      defaults              0      0
  /dev/sda3              /home         ext4      defaults,noatime      0      2

is checked by the dump(8) utility. sets the order for filesystem checks at boot time; see fsck(8).

compare file contents

diff -w file1 file2
  • kill a process
pgrep -f setup|xargs kill
pkill -f setup
  • vim block insert
ctrl + v
shift + i or uppercase i
input
ESC

mod

No larger than one number