Understanding the Linux Kernel’s proc File System

/proc is a special virtual file system. It does not exist on a physical disk but is dynamically generated by the kernel in memory. Its main purpose is to serve as an interface that allows user-space programs (such as ps, top, htop, etc.) to easily obtain runtime information about the kernel and processes, and in … Read more

In-Depth Analysis of Linux Command: uname — Your System ‘ID Card’ Viewer

In-Depth Analysis of Linux Command: uname — Your System 'ID Card' Viewer

📌 Don’t underestimate this command with just 5 letters; it is the first step in getting to know your Linux system. 1. Applicable Scenarios: When Do You Need It? • ✅ Quickly confirm system type: Is it Linux? macOS? Or another Unix? • ✅ Script cross-platform compatibility check: Determine the runtime environment at the beginning … Read more

Common Linux Commands Notes

Common Linux Commands Notes

1. Quick Reference Table for Linux Paths Syntax Meaning Example Description <span><span>/</span></span> 🟥 Root Directory <span><span>/etc/hosts</span></span> Starting point for all paths <span><span>.</span></span> 🟩 Current Directory <span><span>./script.sh</span></span> Indicates “in the current directory” <span><span>..</span></span> 🟨 Parent Directory <span><span>../file.txt</span></span> Parent directory of the current directory <span><span>~</span></span> 🟦 Current User’s Home Directory <span><span>~/docs</span></span> Equivalent to <span><span>/home/username</span></span> <span><span>~user</span></span> 🟪 Specified … Read more

Summary of Common Methods to View Information on Linux Systems

Summary of Common Methods to View Information on Linux Systems

In server operations and maintenance, we often use Linux servers, and it is essential to understand the server’s information status through the command line. Below, I will summarize the commonly used commands for viewing Linux system information, including: kernel version, system version, CPU, memory, hard disk, etc. 1. Command to check the Linux kernel version … Read more

C_SysInfo: A Command-Line Tool in C for Displaying Current System Information

C_SysInfo: A Command-Line Tool in C for Displaying Current System Information

The C_SysInfo project can actually be seen as a simple translation of the previous PySinfo project. This is a typical scenario where I believe online models and local models are particularly suitable for application – a broad “translation” process: 1.The requirements must be very clear about what needs to be done, and the technical path … Read more

Boost Your Efficiency! Automatically Display CPU/Memory/Disk Usage on Linux Login with a Single Script!

Boost Your Efficiency! Automatically Display CPU/Memory/Disk Usage on Linux Login with a Single Script!

Join our operations and maintenance community group: WeChat Group 2.0 | No idle chat, only practical discussions and growth, operations and maintenance professionals are welcome to join. Today, I am sharing a super cool script that automatically displays the system information you usually care about when you log into a Linux server, making it clear … Read more

Common Linux Commands – Part 2

Common Linux Commands - Part 2

File Search Commands: 1. find directory -name “filename“ – Search for files by name 2. find directory -type f -name “*.txt” – Find specific type of files 3. grep “text” filename – Search for text in a file 4. grep -r “text” directory – Recursively search for text in a directory 5. locate filename – … Read more

How to Retrieve Windows System Information in C++

How to Retrieve Windows System Information in C++

Click the above“Mechanical and Electronic Engineering Technology” to follow us In C++, you can use Windows API functions to retrieve various information about the Windows system. Below are some common API functions and sample code for obtaining Windows system information: 1. Operating System Version #include <windows.h> #include <iostream> int main() { OSVERSIONINFOEX osvi; ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); … Read more