RHEL 567 Commands Cheatsheet

download RHEL 567 Commands Cheatsheet

of 5

Transcript of RHEL 567 Commands Cheatsheet

  • 7/21/2019 RHEL 567 Commands Cheatsheet

    1/5

    https://access.redhat.com/solutions/737373
  • 7/21/2019 RHEL 567 Commands Cheatsheet

    2/5

  • 7/21/2019 RHEL 567 Commands Cheatsheet

    3/5

  • 7/21/2019 RHEL 567 Commands Cheatsheet

    4/5

    FILE SYSTEMS, VOLUMES, AND DISKS

    TASK RHEL

    Default le system

    ext3

    ext4

    xfs

    Defragment disk space

    copy data to new le system

    fsck (look for non-contiguous inodes)

    copy data to new le systemfsck (look for non-contiguous inodes)

    xfs_fsr

    Create/modify disk partitions

    fdisk

    parted

    fdisk

    gdisk

    parted

    ssm create

    Format disk partition

    mkfs.lesystem_type (ext4, xfs)

    mkswap

    mkfs.lesystem_type (ext4, xfs)

    mkswap

    ssm create

    Mount storage

    mount

    /etc/fstab

    mount

    /etc/fstab

    ssm mount

    Create physical volume

    pvcreate

    pvcreate

    ssm create (if backend is lvm)

    Create volume group

    vgcreate

    vgcreatessm create (if backend is lvm)

    Create logical volume

    lvcreate

    lvcreate

    ssm create (if backend is lvm)

    Enlarge volumes formatted withdefault le system

    vgextend

    lvextend

    resize2fs

    vgextend

    lvextend

    xfs_growfs

    ssm resize

    Shrink volumes formatted withdefault le system

    resize2fslvreduce

    vgreduce

    XFS cannot currently be shrunk; copy desired data to

    a smaller le system.

    Check/repair le system

    fsck

    fsck

    ssm check

    Congure NFS share

    /etc/exports

    service nfs reload

    /etc/exports

    systemctl reload nfs.service

    Mount and activate swap/etc/fstab

    swapon -a

    Congure static mounts /etc/fstab

    View free disk space df

    5

    5

    6

    5 6

    5 6

    5 6

    5 6

    5 6

    5 6

    5 6

    5 6

    5 6

    5 6

    7

    6 7

    7

    7

    7

    7

    7

    7

    7

    7

    7

    7

    5 6 7

    5 6 7

    5 6 7

  • 7/21/2019 RHEL 567 Commands Cheatsheet

    5/5