diff --git a/02-folder-structure/notes.md b/02-folder-structure/notes.md new file mode 100644 index 0000000..3fb4fb4 --- /dev/null +++ b/02-folder-structure/notes.md @@ -0,0 +1,5 @@ +adduser 'name' -> for adding a new user +ex:- +Screenshot 2026-04-17 150149 +here chirantana is the user, but we can create multiple users inside the home + diff --git a/04-file-management/README.md b/04-file-management/README.md index 744e855..da2a489 100644 --- a/04-file-management/README.md +++ b/04-file-management/README.md @@ -17,8 +17,8 @@ 12. **`tac file.txt`** – Displays file content in reverse order. 13. **`less file.txt`** – Opens a file for viewing with scrolling support. 14. **`more file.txt`** – Similar to `less`, but only moves forward. -15. **`head -n 10 file.txt`** – Displays the first 10 lines of a file. -16. **`tail -n 10 file.txt`** – Displays the last 10 lines of a file. +15. **`head -n(10) file.txt`** – Displays the first 10 lines of a file. [n as 10 here] +16. **`tail -n(10) file.txt`** – Displays the last 10 lines of a file. [n as 10 here] 17. **`nano file.txt`** – Opens a simple text editor. 18. **`vi file.txt`** – Opens a powerful text editor. 19. **`echo 'Hello' > file.txt`** – Writes text to a file, overwriting existing content. diff --git a/05-vi-shortcuts/README.md b/05-vi-shortcuts/README.md index ef15de2..2484a4a 100644 --- a/05-vi-shortcuts/README.md +++ b/05-vi-shortcuts/README.md @@ -64,7 +64,7 @@ ### Working with Multiple Files - `:e filename` – Open a **new file** - `:w` – Save file -- `:wq` – Save and exit +- `:wq!` – Save and exit - `:q!` – Quit **without saving** - `:split filename` – Split screen **horizontally** and open another file - `:vsplit filename` – Split screen **vertically** diff --git a/07-process-management/README.md b/07-process-management/README.md index e3bbec7..824cb71 100644 --- a/07-process-management/README.md +++ b/07-process-management/README.md @@ -16,10 +16,10 @@ A process is an instance of a running program. Linux provides multiple utilities - `kill PID` – Terminate a process by PID - `pkill processname` – Terminate a process by name - `kill -9 PID` – Force kill a process -- `pkill -9 processname` – Kill all instances of a process -- `kill -STOP PID` – Stop a running process +- `pkill -9 processname` – Kills all (instances of a) process with the name 'processname' +- `kill -STOP PID` – Stop a running process - `kill -CONT PID` – Resume a stopped process -- `renice -n 10 -p PID` – Lower priority of a process +- `renice -n 10 -p PID` – Lower priority of a process [lesser the number, more the priority, ex:- 3>4>5, 2>10] - `renice -n -5 -p PID` – Increase priority of a process (requires root) ### Background & Foreground Processes diff --git a/07-process-management/notes.md b/07-process-management/notes.md new file mode 100644 index 0000000..eb25c31 --- /dev/null +++ b/07-process-management/notes.md @@ -0,0 +1,4 @@ + +difference between ps aux VS ps ef +ps aux - contains memory utilization %CPU, %MEM +1 diff --git a/08-monitoring/README.md b/08-monitoring/README.md index cab2bcd..110cf0b 100644 --- a/08-monitoring/README.md +++ b/08-monitoring/README.md @@ -9,11 +9,13 @@ Monitoring system resources is essential to ensure optimal performance, detect i - `top` – Real-time system monitoring - `htop` – Interactive process viewer (requires installation) - `vmstat` – Report system performance statistics -- `free -m` – Show memory usage +- `free -m or free -h` – Show memory usage [memory] +- `nproc` – number of CPU available in the machine [CPU] ### Disk Monitoring - `df -h` – Check disk space usage -- `du -sh /path` – Show disk usage of a specific directory +- `du -sh /path` – Show disk usage of a specific directory [in KB or MB] +- `du -sh *` – Show disk usage for all the files and directories inside the specific directory [in KB or MB] - `iostat` – Display CPU and disk I/O statistics ### Network Monitoring @@ -103,4 +105,4 @@ journalctl -f # Systemd logs ### Checking Kernel Logs ```bash dmesg | tail -``` \ No newline at end of file +``` diff --git a/10-disk-management/README.md b/10-disk-management/README.md index 9ee58df..e3ce4ea 100644 --- a/10-disk-management/README.md +++ b/10-disk-management/README.md @@ -7,7 +7,7 @@ Managing disks and storage efficiently is crucial for system performance and sta ### Viewing Disk Information - `lsblk` – Display block devices -- `fdisk -l` – List disk partitions +- `fdisk -l` – List disk partitions,same as `lsblk` but provides more info about the partition - `blkid` – Show UUIDs of devices - `df -h` – Check disk space usage - `du -sh /path` – Show size of a directory