When configuring an RS-485 serial bus on a Linux embedded system, you'll almost always run into a 120-ohm resistor. That specific value isn't arbitrary — it matches the characteristic impedance of the twisted-pair cable, preventing signal reflections that could corrupt data. But 120 shows up in many other places in programming, networking, and security configurations. Knowing why this number keeps appearing helps you make better choices about hardware, code style, and system hardening.
The 120-Ohm Termination Resistor in Networking
In differential serial communication standards such as RS-485 and CAN bus, termination resistors are placed at each end of the bus. The standard value is 120 Ω because the typical twisted-pair cable used for these networks has a characteristic impedance of 120 Ω. Without proper termination, signal reflections bounce back along the wire, causing bit errors, missed packets, or even hardware damage in extreme cases. For a developer learning Linux, this is a practical example: when you use tools like stty to configure a serial port or write a Python script to read from /dev/ttyUSB0, the underlying hardware must be correctly terminated. A poorly terminated bus can produce intermittent failures that are nearly impossible to debug in software alone. In a cybersecurity context, making sure termination is correct is part of physical-layer security — an attacker might intentionally remove termination resistors to degrade communication, so checking the resistance with a multimeter during a security audit is a legitimate test.

The 120-Character Line Length in Coding Standards
Many coding style guides specify a maximum line length. While the classic 80-character limit dates back to punch cards, modern editors and wide monitors have pushed many projects to adopt 100 or 120 characters. The Linux kernel coding style, for example, recommends 80 columns, but Google’s C++ style guide allows up to 120. Python’s PEP 8 sticks to 79, but the Black formatter defaults to 88. The number 120 appears in several prominent style guides because it fits comfortably on a 1920-pixel-wide screen with a typical font size, leaving room for a sidebar or diff view. As a beginner, sticking to a 120-character limit improves readability and reduces horizontal scrolling when reviewing code in pull requests. In a security context, overly long lines can hide malicious payloads or obfuscated code; enforcing a line length limit makes code review more effective. Many linters (e.g., clang-tidy, pylint) allow you to set --max-line-length=120.
The 120-Second Timeout in Security Configurations
Timeouts are a core part of secure system design. A common default timeout for SSH sessions in many distributions is 120 seconds of inactivity. This value is a trade-off between user convenience and reducing the window for session hijacking. Similarly, web application firewalls often set a 120-second idle timeout for administrative panels. When you configure sshd_config, the ClientAliveInterval and ClientAliveCountMax settings can combine to produce a 120-second cutoff. For example, setting ClientAliveInterval 30 and ClientAliveCountMax 4 gives 120 seconds before an unresponsive client is disconnected. This is a concrete, practical step for hardening a Linux server. In network diagnostics, tools like ping have a default timeout of 10 seconds, but traceroute uses a 5-second wait per hop — 120 is not used there, but the principle of choosing a timeout that balances responsiveness and reliability is the same. When writing your own socket code in Java or C++, always set a timeout (e.g., socket.setSoTimeout(120_000) in Java) to prevent hanging connections that could be exploited for denial-of-service attacks.

Port 120 and Other Curiosities
Port number 120 is officially assigned by IANA to the CFDP (Coherent File Distribution Protocol), but it is rarely used in practice. In educational labs, you might encounter port 120 as a placeholder in firewall rule exercises — for example, allowing inbound TCP traffic on port 120 to simulate a custom service. The number also appears in hexadecimal as 0x78, which is the ASCII code for the letter 'x', and in binary as 1111000. While not directly security-critical, knowing how to convert and interpret these representations helps when reading packet captures or memory dumps.
Another appearance of 120 is in the strace output: the system call poll uses a timeout in milliseconds, and a 120-second timeout equals 120000 ms. When debugging a slow network service, you might see poll([{fd=3, events=POLLIN}], 1, 120000) — that tells you the application waits up to two minutes for data. Recognizing this pattern helps you identify potential performance bottlenecks or timeout-related bugs.
The number 120 is also the product of the first five positive integers (1×2×3×4×5 = 120), making it a factorial. This shows up in combinatorial algorithms, such as calculating permutations of five items. While not directly related to cybersecurity, understanding factorials is useful when analyzing brute-force complexity: a 5-character password from a set of 26 letters has 26^5 possibilities, but if order matters without repetition, the number of permutations for 5 distinct items is exactly 120 — a tiny search space. This reinforces why password length and character set diversity matter.
I once spent two hours debugging a serial link that dropped packets every few minutes. The culprit? A missing 120-ohm termination resistor on one end of the bus. After soldering it in, the errors vanished. That's the kind of real-world headache that a simple resistor — or a line-length limit, or an SSH timeout — can prevent. So when you're setting up a serial network, configuring a code formatter, or tuning an SSH timeout, check for the 120 setting. It's a small number with a big track record.
