Posts

Linux Basics

1. Linux History and GNU 2. Linux Basic Features and Architecture 3. How to Install Linux 4. Install Linux Inside Windows using WSL 5. Free software 6. Linux Chronology 7 .Package Management 8 .Compile and install from source 9 .Important Directories 10. File Permissions 11. Special Permissions 12 .Shell 13. Bash shell in windows 10 14 .Basic Linux command for beginners 15. Input Output Redirection  16. Directory Commands 17. File Commands 18 .Communication Commands 19. Information Commands  20 .IO Commands    21 .Process Management Commands 22. Account Administration Commands 23. Pipes and Filters  24. Top 100 commands to learn.         Familiarization of Basic  Linux Commands- ls, mkdir, rmdir , rm, cat, cp, mv , chmod         User and Group management- useradd, userdel,groupadd,groupdel, passwd          Familiarization of basic  Linux Commands- history, uname, dmesg  ...

top command

  Command: top (Display Linux Processes in Real Time) 🔍 Purpose The top command displays dynamic, real-time information about system processes, including: Process IDs (PIDs) CPU and memory usage User ownership System uptime Load average and much more. It’s essentially a live dashboard for your system. 🧩 Basic Syntax top [options] or simply: top 📘 Example: top Typical Output: top - 10 :41:07 up 2 days, 2 :21, 2 users, load average: 0.23 , 0.14 , 0.09 Tasks: 198 total, 1 running, 197 sleeping, 0 stopped, 0 zombie %Cpu(s): 3.2 us, 1.0 sy, 0.0 ni, 95.6 id, 0.0 wa, 0.0 hi, 0.2 si, 0.0 st MiB Mem : 7989.7 total, 2567.4 free, 1834.1 used, 3588.2 buff/cache MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 5332.1 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1254 root 20 0 700484 8236 5852 S ...

fuser command

  🧠 Command: fuser (File/Filesystem/Port User Identifier) 🔍 Purpose The fuser command shows which processes are currently using a specific file, directory, or socket . It is often used to: Identify which process is using a file , mount point , or device Detect which process is listening on a network port Terminate processes that are using a specific resource 🧩 Basic Syntax fuser [options] name Where: name → can be a file , directory , mount point , or network port 📘 Example 1: Identify Process Using a File fuser test.txt Output: test.txt: 3210 🧩 Explanation 3210 → Process ID (PID) of the process using the file test.txt You can then check what that process is: ps -p 3210 📘 Example 2: Show Processes Using a Directory fuser /home/user/ Output: /home/user/: 1203 c 2145 e 3189 r 🧩 Explanation of Suffixes (Access Types): Symbol Meaning c      Current directory e      Executable being run f  ...

time command

  🧠 Command: time 🔍 Purpose The time command is used to measure how long a command or program takes to execute . It reports three key types of time: real — Total elapsed (wall clock) time user — CPU time spent in user mode sys — CPU time spent in kernel mode 🧩 Basic Syntax time [options] command [arguments] Example: time ls -l 📘 Example 1: Measuring Execution Time Run: time sleep 3 Output: real 0 m3 .003 s user 0 m0 .000 s sys 0 m0 .001 s 🧩 Explanation: Field Meaning real      Actual time elapsed (3.003 seconds in this case) — includes waiting time and CPU time user      Time the CPU spent executing user code (non-kernel mode) sys      Time the CPU spent executing system (kernel) code on behalf of the process 🧠 So here, the command sleep 3 didn’t use CPU, but it took 3 seconds of wall time just waiting. 📘 Example 2: Comparing Commands Let’s compare two ways to print numbers from...