When a router discards a packet because its TTL has reached zero, it will usually send back an ICMP Time Exceeded message explaining what happened. The reply includes the original IPv4 header and at least the first eight bytes of the data that followed it. Since these quoted bytes become part of the ICMP message, they also participate in its checksum. This raises an interesting question: can we…
Lately there has been a lot of discussion about whether LLMs are conscious. Richard Dawkins recently added fuel to the debate by posting an article about his long conversation with Claude, which he nicknamed “Claudia”. He was impressed by its intelligence, sensitivity, humor, and apparent emotional depth, and at some point he wrote to Claudia: “You may not know you are conscious,…
I have a laptop with an external monitor connected, and the external display is set as the primary one. Still, some apps insist on opening new windows on the laptop screen instead. Worse, a new window may open partly off-screen or oversized, so the title bar buttons are not visible and you cannot grab it properly with the mouse. It’s very annoying. That is part of the usual GNOME…
In one of my small sensor dashboard projects, I had multiple devices sending measurements to a backend, and a browser UI showing those measurements live. At first, I was considering the usual options: polling or maybe WebSockets. Polling would work, but it means the browser asks the server for updates on a timer. WebSockets would also work, but they felt heavier than what I actually needed. The…
Imagine you are running a VPS with a single public IP like 203.0.113.10. On this machine, you want to host two separate web sites: orion.example.net atlas.example.com When a user types either domain, DNS points both of them to the same IP address. So how does the server know which project to serve? HTTP Host Header In a plain HTTP request, the browser identifies the target using the Host header.…
When we use AI for work—whether it’s “vibe coding” with an agent, drafting an article, or generating images—good results rarely come in one shot. The workflow usually follows a Human → AI → Human loop: the human sets intent and constraints; the AI generates outputs or takes actions; the human reviews, corrects, and approves the result, repeating until it’s good enough to ship.…
Unix systems represent time as the number of seconds since the Unix epoch: 1970-01-01 00:00:00 UTC This is stored in the C type time_t . On older systems, it’s typically a 32-bit signed integer and therefore can represent time in the range: -2,147,483,648 to 2,147,483,647 Negative values are used to represent times before 1970. The upper bound of 2,147,483,647 seconds since the epoch corresponds…
While IPv6 is the modern standard and the “future of the internet”, there are specific situations where you might need to disable it. The most common reason is to prevent a VPN IPv6 leak which can happen when your VPN client doesn’t fully support IPv6 and fails to properly block it, allowing your system to use its native IPv6 address outside the secure tunnel. Many online guides…
I discovered two issues while using PureVPN’s Linux clients (GUI v2.10.0, CLI v2.0.1) on Ubuntu 24.04.3 LTS (kernel 6.8.0, iptables-nft) 1 . One affects IPv6 traffic, the other the system firewall. 1. IPv6 leak after reconnect After a network transition (e.g. Wi-Fi or Ethernet disconnect/reconnect, or system resume): CLI (IKS enabled) : The client auto-reconnects and shows status as…
PGP (Pretty Good Privacy) is a system for encrypting and signing data using public-key cryptography. You generate a key pair: a public key you share, and a private key you keep secret. If someone wants to send you a private message, they encrypt it using your public key. Only your private key can decrypt it. If you want to prove that a message came from you, you sign it using your private key.…
Changing the hostname on Ubuntu is straightforward. You can do it through the GUI (Settings → System → About → Device Name) 1 : or from the command line: hostnamectl set-hostname newname But there’s a catch. Both the GUI and hostnamectl update the static hostname ( /etc/hostname ), but they don’t touch the /etc/hosts file. A typical /etc/hosts entry looks like this: 127.0.1.1…
Consider the classic shell pipeline: cmd1 | cmd2 At first glance, it’s easy to assume these run in sequence: cmd1 runs to completion, writes its output somewhere, then cmd2 starts and reads it. That interpretation is wrong. Pipelines don’t run sequentially, they run concurrently . When the shell encounters a pipeline, it creates a one-way communication channel using the pipe() system…
Recently I ran into a frustrating but interesting issue on my Linux machine (Ubuntu 24.04.2 LTS): whenever my VPN’s kill switch engaged (when the tunnel went down for any reason), using sudo became noticeably slow. Eventually, I figured out what was happening and found several ways to fix it. The root of the problem was surprising, at least for me, and I thought it was worth sharing. TL;DR My sudo…
Writing to a file that requires root access in a non-root shell requires elevating privileges for the write operation. However, doing something like sudo echo "some text" > /path/to/root-owned-file will fail with a “Permission denied” error. This is because the shell sets up redirections before it executes the command. That means your non-root shell tries to open/truncate…
A common pattern for installing GUI applications distributed as .tar.* archives: Extract tar -xf appname.tar.gz Works for .tar , .tar.gz , .tar.xz , .tar.bz2 . GNU tar auto-detects compression. Move to a permanent location After extraction, you’ll get a self-contained directory (e.g. AppName/ ). Move it to a standard location: System-wide: sudo mv AppName /opt/appname Per-user: mv AppName…
There is a popular post “About the Use of Dot-Slash in Commands” at linfo.org that explains why ./ is used to run a program in the current directory. However, there is an inaccuracy that bothers me: When some text is typed into a shell and then the ENTER key is pressed, the shell assumes that it is a command. The shell immediately checks to see if the first string (i.e., sequence of…
In a terminal, you can clear the screen in two common ways: Run the clear command Press Ctrl+L The result looks the same at first, but there’s a catch: clear can also wipe your scrollback buffer 1 , while Ctrl+L never does. Also, behind the scenes they’re implemented in different ways. Ctrl+L When you press Ctrl+L at the Bash prompt, it’s not invoking an external program, but instead it’s handled…
Today I learned about this weird command yes . It prints the letter “y” or a specified string 1 indefinitely until you stop it (with Ctrl+C )… $ yes y y y ... or $ yes 'Hello world' Hello world Hello world Hello world ... My first thought was “why the heck would anyone need it?”. Well, below are the most common uses according to ChatGPT: Automating prompts : Many CLI…
When you run: ./myscript.sh you’re not running your script directly . You’re asking your shell to fork() and the child process to call: execve ( './myscript.sh' , argv , envp ) This is the standard Unix model. But myscript.sh isn’t an ELF binary — it’s a text file. So how does the kernel know what to do? If the file starts with the shebang #! , the kernel recognizes this as a “script”. It parses…
In the default GNU Bash shell (and many others), pressing Ctrl-R triggers reverse incremental history search . It lets you search your command history interactively, as you type. Try it: ( reverse-i-search ) ` ' : Now start typing any part of a previous command, for example ssh . Bash will live-search backward in your history and show the most recent match: ( reverse-i-search ) ` ssh ' : ssh…
There is no single function called exec() . Instead, the term refers to a family of functions in libc — execl , execv , execvp etc. that all serve the same purpose: replacing the current process image with a new program 1 . These functions are all wrappers around the execve(2) system call. They differ in how they accept arguments and whether they search $PATH , but ultimately call execve() . //…
In Linux documentation, commands are often followed by a number in parentheses, like grep(1) or mount(8) . That number refers to a specific section of the man pages , which are organized by the type of content they describe: Section Description Examples 1 User commands : Executable programs available in user environments (usually in $PATH ). ls(1) , grep(1) 2 System call interfaces : Low-level…
Yanking (copying) text with y in Vim and then trying to paste it elsewhere won’t work. Likewise, copying text outside Vim and pasting it into Vim with p won’t work either. The reason is that by default, Vim stores yanked text in its internal unnamed register " , which is separate from the system clipboard. To interact with the system clipboard, we have to explicitly use the + register. For…
Anagogistis (Greek: αναγωγιστής ) means reductionist : someone who tries to understand complex things by breaking them down into simpler parts. Hello! I’m Andreas, a software engineer who writes here about technical problems, experiments, and ideas I find interesting enough to explore properly. The subjects vary, but the aim is usually the same: to understand something properly, record what…