UNIX
Notes for Unix-like, such as Linux (WSL), macOS, bash.
Latest
-
How to Adjust NVIDIA GPU Frequency, Volte and Other Settings on Linux (or Overlocking)
2025-09-09 | #Words: 2512
Recently, I wanted to adjust the frequency of my NVIDIA GPU on Linux because I noticed some software (like FaceFusion) doesn't utilize the GPU at its maximum frequency (e.g., a maximum of 2000 MHz, but only 1850 MHz in practice). So I decided to figure out how to tweak settings like frequency. This article will use `nvtop` and `nvidia-smi` for monitoring.
-
How to Fix Broken sudo: Error 'sudo: /etc/sudo.conf is owned by uid 1000, should be 0'
2025-07-21 | #Words: 312
The issue is that the owner and group of files like `/etc/sudo.conf` (and related directories) are no longer `root`. I searched online for solutions and tried many, but none worked—for good reason: I was stuck in a dead loop. Changing permissions with `chown` requires root privileges, which I couldn’t obtain. Worse, I hadn’t set a password for the `root` user.
-
Ubuntu can't access Network: No DNS or APT Failure in Setting
2025-06-30 | #Words: 959
For some unknown reason, APT suddenly stopped working: only a few default repositories were accessible, while others showed `ign` (meaning they couldn’t be connected to). I tried several mirrors, but the issue persisted. At this point, Wi-Fi was connected, so I suspected a GPG key problem. However, as I tried to fix it, the network stopped working entirely
-
What’s the Difference Between Private-Use Networks and Link Local? What’s the Relationship Between Peer-to-Peer Wi-Fi and Wi-Fi Direct?
2025-06-28 | #Words: 1611
First, this entry is automatically generated by the system kernel. Even if you delete it, it will reappear after a restart. Therefore, I do not recommend modifying the routing table entries. Instead, adjust the subnet mask (or add a new entry, e.g., `169.254.0.0` with a mask of `255.255.255.0`).
-
How to use lstopo to visualize System Topology
2025-06-21 | #Words: 892
`lstopo` is an excellent tool for generating intuitive, concise system topology diagrams. This article documents small issues I encountered while using it—it is not a comprehensive manual. For detailed options, refer to the official documentation. Many Linux distributions come with `hwloc` preinstalled. If your system lacks it (e.g., Ubuntu), install it with
-
Keep Commands Running After Exiting SSH: A Quick Note on `nohup` & Alias
2025-02-09 | #Words: 269
It's common to need programs/commands to keep running after exiting SSH, but I always forget how to do it. Since I usually set it up as an **alias** for quick use, I tend to lose track of the details over time and have to look it up again. That’s why I’m writing this note to document it.
-
Ubuntu Add New Mechanical Hard Drive: Fix SMB Remote Access Permission Issue
2025-02-05 | #Words: 172
Recently, my hard drive was almost full, so I decided to add a mechanical hard drive. After installing the drive on Ubuntu, I encountered a frustrating problem: SMB remote access showed permission denied, even though local access worked perfectly.
-
How to check disk in hexadecimal by bytes in terminal on Mac or Linux
2023-07-05 | #Words: 546
Before start to introduce, something be emphasized: This method does not guarantee to view all hard disks. Some hard disks will display Resource busy due to some reasons, such as Time Machine and built-in hard disks.
-
Mount and unmount external hard drive on Mac by diskutil in Terminal
2023-07-05 | #Words: 1284
Recently, when I used macOS to mount an external hard drive, I couldn’t mount it using mount. Many articles didn’t explain the various situations in detail, so I wrote a blog to record it.
-
How to move installed WSL (Ubuntu) to another drive or location
2022-09-16 | #Words: 452
Due to my C drive is almost full, and not empty much after try to clean it, so I plan to move WSL to a new drive.
-
What is format of man page in Linux and macOS? How to write a man page
2022-07-27 | #Words: 576
In Linux and macOS, we often need to use `man xxx` to view the introduction and usage of a program, system call, etc. This interface is called `manual page`, but sometimes it is simply called `manpage`.
-
How to access Windows files in WSL
2022-05-12 | #Words: 69
First enter WSL, then enter the root directory `/`, and use `ls` to see a directory named `mnt` (mnt is the abbreviation of mount).