├── Important Commands.txt ├── Linux+ Labs.zip ├── Linux+ Notes (CherryTree).ctd └── Linux+ Notes (PDF).pdf /Important Commands.txt: -------------------------------------------------------------------------------- 1 | 2 | KERNEL MODULES 3 | 4 | uname -a : unix name 5 | /boot : vmlinuz (kernel file) 6 | /usr/lib/modules : modules for kernel 7 | or /lib/modules 8 | lsmod : pull up your modules 9 | modinfo : module information 10 | insmod : install module 11 | rmmod : remove module 12 | 13 | Activate the module : 14 | reboot 15 | modprobe : add/remove module from kernel without installation (pen drive, etc) 16 | /etc/modprobe.d (new) or modprobe.conf (old) 17 | modprobe -a 18 | sysctl -a (parameter being passed to the kernel) 19 | 20 | ------------------------------------- 21 | 22 | Kernel File Locations 23 | 24 | /etc/modprobe.d/ or /etc/modules-load.d/ : conf file generated at system installation or created by admin 25 | /lib/modprobe.d/ : generated by third party apps 26 | /usr/lib/modprobe.d/, if exists, typically linked to /lib/modprobe.d/ 27 | /run/modprobe.d : generated at runtime 28 | 29 | insmod : insert/install/load single module to linux kernel 30 | modprobe : more advance and easier than insmod, load any additional dependencies if needed 31 | depmod : scans system, determines any needed module, reviews and updates the module. 32 | PATA parallel interface 2 device per adapter /dev/hdx (x = a,b,c,d...) 33 | SATA serial interface 4 device per adapter /dev/sdx (x = a,b,c,d...) 34 | SCSI parallel interface 8 device per adapter 35 | 36 | ----------------------------------------- 37 | 38 | BOOT PROCESS 39 | 40 | /boot : Kernel and initram disk + (grub and grub2) 41 | /boot/grub2/grub.cfg (Boot menu options) DO NOT MODIFY 42 | /boot/efi/EFI/centos/ 43 | 44 | /etc/grub.d/40_custom (EDIT THIS ONE) 45 | grub2-mkconfig 46 | (Finds vmlinuz & initrd) 47 | vmlinux : non compressed 48 | vmlinuz : compressed 49 | 50 | initramfs = initrd 51 | dracut: create initial ramdisk images for preloading modules 52 | 53 | ------------------------------------- 54 | 55 | NETWORK 56 | 57 | /etc/sysconfig : Centos 58 | /etc/sysconfig/network-scripts/ : Script files for interface 59 | 60 | /etc/network OR /etc/netplan: Ubuntu 61 | 62 | Global settings i.e. DNS : 63 | /etc/sysconfig/network : default value 64 | /etc/resolv.conf : DNS 65 | /etc/hosts : Override DNS 66 | /etc/hostname : Computer's name (Use hostnamectl command to change this) 67 | 68 | ss -atp (all session, tcp, port) 69 | ss --route 70 | ss --program (programs that have port open) 71 | ss --process 72 | 73 | ------------------------------------- 74 | 75 | STORAGE 76 | 77 | lsblk : list block 78 | fdisk : MBR 79 | gdisk : GPT 80 | parted : partition editor (advance) 81 | 82 | LVM : /usr/sbin/pv* vg* lv* 83 | Physical Volume 84 | Volume Group 85 | Logical Volume 86 | 87 | pvcreate, pvdisplay 88 | vgcreate, vgdisplay 89 | lvcreate -L 1500G vgname -n lvname 90 | lvdisplay 91 | 92 | /dev/mapper/lvname 93 | 94 | vgextend 95 | lvresize -L +1T /dev/lvname 96 | lvs 97 | 98 | resize2fs or xfs_resize 99 | 100 | lvremove --> vgremove --> pvremove 101 | 102 | ------------------------------------- 103 | 104 | FILESYSTEM 105 | 106 | udev : detects new hw connects to system. 107 | /dev folder 108 | 109 | /etc/fstab : table that indicates the drive device file 110 | 111 | df : disk usage by partition 112 | du : disk usage by directory 113 | iostat : real time chart 114 | lsblk : display partition sizes and mount point 115 | blkid : displays info about block devices such as storage dev 116 | chattr : change attribute 117 | debugfs : view/modify filesystem structure 118 | dumpe2fs : block and superblock info 119 | e2label : changes label 120 | resizee2fs : expands/shrinks filesystem 121 | tune2fs : modify filesystem parameters 122 | 123 | xfs_admin and xfs_info is for xfs filesystem. 124 | 125 | -------------------------------------------- 126 | 127 | pvcreate : create physical volume 128 | vgcreate : groups physical volumes in a virtual log group 129 | lvcreate : creates logival volume in physical partition 130 | 131 | -------------------------------------------------------------------------------- /Linux+ Labs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsiddhant/Linux/028ae01c5e911d61dd87fe06160e786f996b0c31/Linux+ Labs.zip -------------------------------------------------------------------------------- /Linux+ Notes (PDF).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsiddhant/Linux/028ae01c5e911d61dd87fe06160e786f996b0c31/Linux+ Notes (PDF).pdf --------------------------------------------------------------------------------