CONTENTS
command | description | example |
---|---|---|
ls |
|
|
cat |
|
|
cd |
|
|
pwd |
|
|
mkdir |
|
|
file |
|
|
cp |
|
|
mv |
|
|
rm |
|
|
ln |
|
|
chmod |
|
|
chown |
|
|
find |
|
|
locate |
|
|
du |
|
|
df |
|
|
dd |
|
|
mount/umount |
|
|
|
|
|
---|---|---|
more/less |
|
|
haid/tail |
|
|
grep |
|
|
sed |
|
|
awk |
|
|
cut |
| cut -d' ' |
sort |
|
|
uniq |
|
|
wc |
|
|
diff |
|
|
vi/vim/nano |
|
|
command | description |
|
---|---|---|
systemctl |
|
|
journalctl |
|
|
shutdown |
|
|
top / htop |
|
|
ps / pgrep / pstree |
|
|
pstree |
|
|
kill / xkill / pkill / killall |
|
|
renice |
|
|
time / uptime / w | prints a summary of the current activity on the system, including what each user is doing, and their process |
|
lsof |
|
|
free |
|
|
df |
|
|
strace |
|
|
iostat / pidstat / vmstat |
|
|
findmnt |
|
|
|
|
|
---|---|---|
su / sudo |
|
|
date |
|
|
alias |
|
|
env |
|
|
|
|
|
---|---|---|
useradd, userdel, usermod |
|
|
passwd |
|
|
groupadd / groupdel / groupmod |
| groupadd -g group-ID group-name |
gpasswd |
|
|
getent | display who is a member of a group | getent group group-name |
id / groups |
|
|
visudo |
|
|
|
|
|
---|---|---|
man / whatis |
|
|
whereis | get executable path |
|
|
|
|
---|---|---|
netstat |
|
|
netcat |
|
|
iptables |
|
|
ip |
|
|
ping |
|
|
nslookup |
|
|
ifconfig |
|
|
ifup / ifdown |
|
|
dig |
|
|
lsof -i | reveal information about your network sockets |
|
traceroute |
|
|
telnet |
|
|
ssh |
|
|
scp |
|
|
nmap |
|
|
|
|
|
---|---|---|
rpm |
|
|
yum |
|
|
apt |
|
|
pip |
|
|
|
|
|
---|---|---|
uname |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---|---|---|
top |
|
|
free |
|
|
df |
|
|
iostat |
|
|
pidstat |
|
|
vmstat |
|
|
|
|
|
---|---|---|
df -Th |
|
|
lsblk |
|
|
fdisk -l | show partitions |
|
pvs | list out the physical volumes in an LVM group |
|
vgs | list out the volume groups within an LVM group |
|
lvs | List out the logical volumes within an LVM group |
|
parted |
|
|
References: https://www.binarytides.com/linux-command-check-disk-partitions/
|
|
|
---|---|---|
journalctl |
|
|
less /var/log/auth.log (DEBIAN-based operating systems) less /var/log/secure (RHEL-based operating systems) journalctl SYSLOG_FACILITY=10 | get user's sudo history |
|
free
df
visudo
findmnt
uname
|
|
---|---|
|
|
|
|
https://discuss.devopscube.com/t/how-to-comment-and-uncomment-multiple-line-vi-terminal-editor/64
https://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-uncomment-lines-in-vim
2. Copy, cut and paste
https://vim.fandom.com/wiki/Copy,_cut_and_paste
Physical
Physical drive
optical drive /dev/sda
logical volume: A logical volume created by the LVM is a logical storage device which can span multiple physical volumes.
partition /dev/sda1
A volume is created on a dynamic disk -- a logical structure that can span multiple physical disks -- while a partition is created on a basic disk.
https://www.tecmint.com/create-lvm-storage-in-linux/
https://www.tecmint.com/extend-and-reduce-lvms-in-linux/
https://www.tecmint.com/take-snapshot-of-logical-volume-and-restore-in-lvm/
Disk = A block device = A storage device, e.g. SSD, hard disk
A section of a storage device is called as partition which is in no way filesystem that what is done to it via OS.
As to meaning of the volume, there are 2 types either physical or logical.
A physical volume from the point of view of your computer a physical hard disc.
A logical volume is a logical disc which may spread across multiple physical discs.
The easiest way to think of a physical volume (PV) is that it is a physical partition that has a partition type of “Linux LVM” (type 8e - fdisk or type 8e00 - gdisk) and has been "marked" as a PV using pvcreate
https://wiki.archlinux.org/index.php/Software_RAID_and_LVM
Failed to load
References:
Join the newsletter to receive the latest updates in your inbox.