Code makes the world a better place

Configure DNS on Linux/Unix from the Command Line

Here’s what happened: starting yesterday, a machine in my lab suddenly couldn’t access the Internet. I usually use that machine as a proxy, because sometimes I need an NCTU IP address for looking up papers. At first I thought Squid was broken, so I spent a long time tweaking the configuration—only to realize the issue didn’t seem to be Squid. Then I was shocked to find that I could SSH into the machine, but it couldn’t connect outbound.

Continue reading

A Concise Guide to Shell Internals and Implementation

Shell Introduction

Whether you are using a local Unix machine, Windows, or connecting to a remote server, you will open a terminal (Terminal). After you log in, the initial screen is a shell, where developers can enter commands to run programs. In a sense, when people say “using the terminal,” they often mean “using the shell,” even though those terms are not originally identical. For more details about shells, see the English Wikipedia page “C shell”.

Continue reading