<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[VMHeaven Guides]]></title><description><![CDATA[Tested guides and error fixes from the VMHeaven team on Linux, Windows Server, RDP, SSH, Docker and self-hosting. Commands we have run ourselves.]]></description><link>https://vmheaven.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6ae90aeb22ec2849538a81fe/7e3845e6-99c1-44e9-9737-2e5b6e093ab5.png</url><title>VMHeaven Guides</title><link>https://vmheaven.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 10:07:54 GMT</lastBuildDate><atom:link href="https://vmheaven.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Linux commands cheat sheet: files, processes, networking and more]]></title><description><![CDATA[First published on the VMHeaven blog: Linux commands cheat sheet: files, processes, networking and more Short answer: the tables below group the Linux…]]></description><link>https://vmheaven.hashnode.dev/linux-commands-cheat-sheet-files-processes-networking-and-more</link><guid isPermaLink="true">https://vmheaven.hashnode.dev/linux-commands-cheat-sheet-files-processes-networking-and-more</guid><category><![CDATA[Linux]]></category><category><![CDATA[Bash]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[VMHeaven]]></dc:creator><pubDate>Mon, 02 Nov 2026 22:49:49 GMT</pubDate><content:encoded><![CDATA[<blockquote>
<p>First published on the VMHeaven blog: <a href="https://vmheaven.io/blog/guides/linux-commands-cheat-sheet">Linux commands cheat sheet: files, processes, networking and more</a></p>
</blockquote>
<p><strong>Short answer:</strong> the tables below group the Linux commands a Linux VPS admin actually reaches for (files, processes, networking, permissions, packages), with the one-line version of what each does. Where a command has its own in-depth article, the text links to it.</p>
<h2>Files and directories</h2>
<table>
<thead>
<tr>
<th>Command</th>
<th>What it does</th>
</tr>
</thead>
<tbody><tr>
<td>ls -la</td>
<td>List files, including hidden ones, with permissions and sizes</td>
</tr>
<tr>
<td>cd path</td>
<td>Change directory</td>
</tr>
<tr>
<td>pwd</td>
<td>Print the current directory</td>
</tr>
<tr>
<td>cp -r src dst</td>
<td>Copy, recursively for a directory</td>
</tr>
<tr>
<td>mv src dst</td>
<td>Move or rename</td>
</tr>
<tr>
<td>rm -rf path</td>
<td>Delete, recursively and without confirmation; there is no undo</td>
</tr>
<tr>
<td>mkdir -p a/b/c</td>
<td>Create a directory, and any missing parent directories</td>
</tr>
<tr>
<td>touch file</td>
<td>Create an empty file, or update its modified time</td>
</tr>
<tr>
<td>ln -s target link</td>
<td>Create a symbolic link</td>
</tr>
<tr>
<td>find /path -name '*.log'</td>
<td>Search for files by name, recursively</td>
</tr>
<tr>
<td>df -h</td>
<td>Disk space free, per mounted filesystem, in human-readable units</td>
</tr>
<tr>
<td>du -sh path</td>
<td>Total size of a directory</td>
</tr>
</tbody></table>
<p>For finding <em>what</em> is filling a disk rather than just how full it is, see <a href="https://vmheaven.io/blog/guides/check-disk-usage-linux">checking disk usage on Linux</a>.</p>
<h2>Permissions and ownership</h2>
<table>
<thead>
<tr>
<th>Command</th>
<th>What it does</th>
</tr>
</thead>
<tbody><tr>
<td>chmod 755 file</td>
<td>Set exact permissions by octal mode</td>
</tr>
<tr>
<td>chmod +x file</td>
<td>Add execute, leaving read/write as they were</td>
</tr>
<tr>
<td>chown user:group file</td>
<td>Change the owning user and group</td>
</tr>
<tr>
<td>ls -l file</td>
<td>Show a file's current mode and owner</td>
</tr>
</tbody></table>
<h2>Processes</h2>
<table>
<thead>
<tr>
<th>Command</th>
<th>What it does</th>
</tr>
</thead>
<tbody><tr>
<td>ps aux</td>
<td>List every running process</td>
</tr>
<tr>
<td>top / htop</td>
<td>Live, updating view of CPU and memory per process</td>
</tr>
<tr>
<td>kill PID</td>
<td>Ask a process to stop (SIGTERM)</td>
</tr>
<tr>
<td>kill -9 PID</td>
<td>Force-kill a process (SIGKILL, no cleanup)</td>
</tr>
<tr>
<td>pkill name</td>
<td>Kill by process name instead of PID</td>
</tr>
<tr>
<td>nohup cmd &amp;</td>
<td>Run a command that survives the terminal closing</td>
</tr>
</tbody></table>
<blockquote>
<p>For anything that needs to keep running after you disconnect and that you want to come back to (not just survive, but reattach to), <a href="https://vmheaven.io/blog/guides/tmux-cheat-sheet">tmux</a> does that better than <code>nohup</code>, which only keeps the process alive, not your terminal session with it.</p>
</blockquote>
<h2>Networking</h2>
<table>
<thead>
<tr>
<th>Command</th>
<th>What it does</th>
</tr>
</thead>
<tbody><tr>
<td>ip -4 addr show</td>
<td>Show IPv4 addresses on every interface</td>
</tr>
<tr>
<td>ip route</td>
<td>Show the routing table</td>
</tr>
<tr>
<td>ss -tlnp</td>
<td>List listening TCP ports and the process on each</td>
</tr>
<tr>
<td>ping host</td>
<td>Test reachability and round-trip time</td>
</tr>
<tr>
<td>curl -I url</td>
<td>Fetch just the HTTP headers of a URL</td>
</tr>
<tr>
<td>dig domain</td>
<td>Query DNS records for a domain</td>
</tr>
<tr>
<td>nc -zv host port</td>
<td>Test whether a single TCP port is open</td>
</tr>
</tbody></table>
<p>More on <code>ss</code>, <code>lsof</code> and the other ways to check what is listening in <a href="https://vmheaven.io/blog/guides/check-open-ports-linux">checking open ports on Linux</a>.</p>
<p>Setting an address so it stops changing on reboot is covered in <a href="https://vmheaven.io/blog/guides/static-ip-address">static IP addresses</a>, and clearing a stale DNS answer in <a href="https://vmheaven.io/blog/guides/flush-dns-cache">flushing the DNS cache</a>.</p>
<h2>Services and logs (systemd)</h2>
<table>
<thead>
<tr>
<th>Command</th>
<th>What it does</th>
</tr>
</thead>
<tbody><tr>
<td>systemctl status name</td>
<td>Is a service running, and its recent log lines</td>
</tr>
<tr>
<td>systemctl restart name</td>
<td>Restart a service</td>
</tr>
<tr>
<td>systemctl enable name</td>
<td>Start a service automatically on boot</td>
</tr>
<tr>
<td>journalctl -u name -f</td>
<td>Follow a service's logs live</td>
</tr>
<tr>
<td>journalctl -xe</td>
<td>Jump to the end of the system log with extra context</td>
</tr>
</tbody></table>
<h2>Installing software</h2>
<table>
<thead>
<tr>
<th>Distribution</th>
<th>Install</th>
<th>Update everything</th>
</tr>
</thead>
<tbody><tr>
<td>Debian, Ubuntu</td>
<td>sudo apt install name</td>
<td>sudo apt update &amp;&amp; sudo apt upgrade</td>
</tr>
<tr>
<td>RHEL, Rocky, Alma</td>
<td>sudo dnf install name</td>
<td>sudo dnf upgrade</td>
</tr>
<tr>
<td>Alpine</td>
<td>sudo apk add name</td>
<td>sudo apk update &amp;&amp; sudo apk upgrade</td>
</tr>
</tbody></table>
<p>A command not found right after installing often means the shell has not reloaded its command path yet (<code>hash -r</code> fixes that), or the package installs under a different binary name than expected.</p>
<h2>Text processing</h2>
<table>
<thead>
<tr>
<th>Command</th>
<th>What it does</th>
</tr>
</thead>
<tbody><tr>
<td>cat file</td>
<td>Print a file's contents</td>
</tr>
<tr>
<td>less file</td>
<td>Page through a file (q to quit)</td>
</tr>
<tr>
<td>grep text file</td>
<td>Search for text inside a file</td>
</tr>
<tr>
<td>grep -r text dir</td>
<td>Search recursively through a directory</td>
</tr>
<tr>
<td>tail -f file</td>
<td>Follow a file as new lines are written to it</td>
</tr>
<tr>
<td>wc -l file</td>
<td>Count lines in a file</td>
</tr>
<tr>
<td>sed 's/old/new/g' file</td>
<td>Replace text (stream editor)</td>
</tr>
</tbody></table>
<h2>Archives and transfers</h2>
<table>
<thead>
<tr>
<th>Command</th>
<th>What it does</th>
</tr>
</thead>
<tbody><tr>
<td>tar -czvf out.tar.gz dir/</td>
<td>Create a compressed archive</td>
</tr>
<tr>
<td>tar -xzvf out.tar.gz</td>
<td>Extract one</td>
</tr>
<tr>
<td>scp file user@host:/path</td>
<td>Copy a file to a remote server over SSH</td>
</tr>
<tr>
<td>rsync -av src/ user@host:/path/</td>
<td>Sync a directory, only transferring what changed</td>
</tr>
</tbody></table>
<p>More tar flags and what each one does in <a href="https://vmheaven.io/blog/guides/extract-tar-gz-linux">extracting tar.gz files on Linux</a>.</p>
<h2>The one command that stops everyone</h2>
<p>Sooner or later something opens vim (a <code>git commit</code>, <code>crontab -e</code>, a minimal server image with no nano installed), and the hardest part is getting back out:</p>
<p><code>Esc</code> then <code>:wq</code> saves and quits; <code>:q!</code> quits and discards changes. The full table of exit commands, and why vim gets stuck in the first place, is in <a href="https://vmheaven.io/blog/guides/how-to-exit-vim">how to exit vim</a>.</p>
<h2>SSH, the entry point to all of the above</h2>
<p>Every command on this page assumes you can already get into the server. For the order to run these in on a brand-new server (create a user, lock down SSH, set up a firewall), see <a href="https://vmheaven.io/blog/guides/initial-server-setup">initial server setup</a>.</p>
<h2>Frequently asked</h2>
<h3>What is the most important Linux command for a beginner to learn first?</h3>
<p>cd and ls (moving around and seeing what is there), followed by cat or less to read a file and sudo for anything that needs elevated permissions. Everything else builds on being able to navigate and read first.</p>
<h3>How do I see what is using CPU or memory on a Linux server?</h3>
<p>top or htop for a live, updating view; ps aux for a one-time snapshot. htop is easier to read but is not always preinstalled; apt install htop or dnf install htop adds it.</p>
<h3>How do I find a file when I don't know which directory it's in?</h3>
<p>find / -name 'filename' searches recursively from the root; locate filename is faster if the locate database is installed and up to date (updatedb refreshes it), but will not find anything created since the last update.</p>
<h3>What is the difference between kill and kill -9?</h3>
<p>kill PID sends SIGTERM, asking the process to shut down cleanly and save its state. kill -9 PID sends SIGKILL, which the process cannot ignore or clean up after; use it only once a plain kill has failed.</p>
]]></content:encoded></item><item><title><![CDATA[tmux cheat sheet: sessions, windows, panes and the keys you actually use]]></title><description><![CDATA[First published on the VMHeaven blog: tmux cheat sheet: sessions, windows, panes and the keys you actually use Short answer: tmux keeps a terminal session…]]></description><link>https://vmheaven.hashnode.dev/tmux-cheat-sheet-sessions-windows-panes-and-the-keys-you-actually-use</link><guid isPermaLink="true">https://vmheaven.hashnode.dev/tmux-cheat-sheet-sessions-windows-panes-and-the-keys-you-actually-use</guid><category><![CDATA[Linux]]></category><category><![CDATA[ssh]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[VMHeaven]]></dc:creator><pubDate>Mon, 02 Nov 2026 22:48:20 GMT</pubDate><content:encoded><![CDATA[<blockquote>
<p>First published on the VMHeaven blog: <a href="https://vmheaven.io/blog/guides/tmux-cheat-sheet">tmux cheat sheet: sessions, windows, panes and the keys you actually use</a></p>
</blockquote>
<p><strong>Short answer:</strong> tmux keeps a terminal session running on the server after you disconnect, and lets you split it into multiple windows and panes. Every command below starts with the prefix key, <code>Ctrl-b</code> by default, pressed and released, then the key that follows it; the two are never held down together.</p>
<h2>The commands you use every day</h2>
<table>
<thead>
<tr>
<th>Keys (after Ctrl-b)</th>
<th>Action</th>
</tr>
</thead>
<tbody><tr>
<td>c</td>
<td>New window</td>
</tr>
<tr>
<td>n / p</td>
<td>Next / previous window</td>
</tr>
<tr>
<td>0-9</td>
<td>Jump to window number</td>
</tr>
<tr>
<td>,</td>
<td>Rename the current window</td>
</tr>
<tr>
<td>%</td>
<td>Split pane vertically (side by side)</td>
</tr>
<tr>
<td>"</td>
<td>Split pane horizontally (stacked)</td>
</tr>
<tr>
<td>arrow keys / o</td>
<td>Move to the next pane</td>
</tr>
<tr>
<td>z</td>
<td>Zoom the current pane to full size, press again to undo</td>
</tr>
<tr>
<td>d</td>
<td>Detach: leave the session running and return to your shell</td>
</tr>
<tr>
<td>[</td>
<td>Enter copy mode (scroll back, select text)</td>
</tr>
<tr>
<td>x</td>
<td>Kill the current pane (asks to confirm)</td>
</tr>
<tr>
<td>&amp;</td>
<td>Kill the current window (asks to confirm)</td>
</tr>
<tr>
<td>?</td>
<td>List every key binding</td>
</tr>
</tbody></table>
<h2>Sessions: the part that survives a disconnect</h2>
<p>A session is what tmux calls the whole thing: its windows, their panes and everything running inside them. It keeps running on the server whether or not a terminal is attached to it, which is the entire point: start a long build, a download or a game server inside tmux over SSH, detach, close your laptop, and it is still running when you reconnect.</p>
<table>
<thead>
<tr>
<th>Command</th>
<th>Action</th>
</tr>
</thead>
<tbody><tr>
<td>tmux</td>
<td>Start a new, unnamed session</td>
</tr>
<tr>
<td>tmux new -s name</td>
<td>Start a new session with a name</td>
</tr>
<tr>
<td>tmux ls</td>
<td>List running sessions</td>
</tr>
<tr>
<td>tmux attach</td>
<td>Attach to the most recent session</td>
</tr>
<tr>
<td>tmux attach -t name</td>
<td>Attach to a session by name</td>
</tr>
<tr>
<td>tmux kill-session -t name</td>
<td>Kill a session (and everything in it) by name</td>
</tr>
</tbody></table>
<p>Inside tmux, the same actions have key bindings: <code>Ctrl-b d</code> detaches, <code>Ctrl-b s</code> opens a visual list of sessions to switch between, and <code>Ctrl-b $</code> renames the current session.</p>
<blockquote>
<p>A detached session is not the same as a job left running with <code>nohup</code> or <code>disown</code>. Those survive a closed terminal too, but you cannot get back into them to see their output or type more input. tmux gives you both: the process keeps running <em>and</em> you can reattach to its terminal exactly as you left it.</p>
</blockquote>
<h2>Windows and panes</h2>
<p>A window is a full screen inside the session, shown as a tab-like list at the bottom; a pane is a rectangle the window is split into. Most people run one shell per window and only split panes when they need two things side by side (logs next to a shell, say).</p>
<table>
<thead>
<tr>
<th>Keys (after Ctrl-b)</th>
<th>Action</th>
</tr>
</thead>
<tbody><tr>
<td>c</td>
<td>New window</td>
</tr>
<tr>
<td>w</td>
<td>Visual list of windows to switch between</td>
</tr>
<tr>
<td>l</td>
<td>Last active window</td>
</tr>
<tr>
<td>%</td>
<td>Split the current pane vertically</td>
</tr>
<tr>
<td>"</td>
<td>Split the current pane horizontally</td>
</tr>
<tr>
<td>q</td>
<td>Briefly show pane numbers</td>
</tr>
<tr>
<td>Ctrl + arrow keys</td>
<td>Resize the current pane</td>
</tr>
<tr>
<td>Space</td>
<td>Cycle through the built-in pane layouts</td>
</tr>
<tr>
<td>!</td>
<td>Break the current pane out into its own window</td>
</tr>
</tbody></table>
<h2>Scrolling and copying text</h2>
<p>tmux does not scroll with the mouse wheel by default the way a normal terminal does: it has its own scrollback buffer, entered with <code>Ctrl-b [</code> (copy mode). Inside copy mode the arrow keys, Page Up/Page Down and <code>Ctrl-u</code>/<code>Ctrl-d</code> move around; <code>q</code> or <code>Esc</code> leaves it.</p>
<table>
<thead>
<tr>
<th>Key</th>
<th>Action</th>
</tr>
</thead>
<tbody><tr>
<td>Ctrl-b [</td>
<td>Enter copy mode</td>
</tr>
<tr>
<td>Space</td>
<td>Start a selection</td>
</tr>
<tr>
<td>Enter</td>
<td>Copy the selection and exit copy mode</td>
</tr>
<tr>
<td>q / Esc</td>
<td>Exit copy mode without copying</td>
</tr>
<tr>
<td>Ctrl-b ]</td>
<td>Paste the last copied text</td>
</tr>
<tr>
<td>/</td>
<td>Search forward; n jumps to the next match</td>
</tr>
</tbody></table>
<blockquote>
<p>If your terminal supports mouse reporting, <code>set -g mouse on</code> in <code>~/.tmux.conf</code> turns on mouse scrolling, pane resizing by drag and click-to-select. It is the setting most people add first.</p>
</blockquote>
<h2>Attach and detach, precisely</h2>
<p>“Detach” and “attach” are the two sides of the same thing: <code>Ctrl-b d</code> detaches from inside tmux, <code>tmux attach</code> (or <code>tmux attach -t name</code> for a specific one) reattaches from an ordinary shell. Closing the terminal window, losing the SSH connection, or your laptop going to sleep all detach you the same way a crash would: the session keeps running on the server either way. Two people can even attach to the same session at once and both see every keystroke, useful for pairing over SSH.</p>
<pre><code>ssh root@203.0.113.10
tmux new -s build          # start a long job in a named session
# ... Ctrl-b d to detach, close the laptop, go home ...

ssh root@203.0.113.10
tmux ls                    # build: 1 windows (created ...)
tmux attach -t build       # back exactly where you left it
</code></pre>
<h2>tmux vs screen</h2>
<p>GNU Screen does the same basic job (a detachable terminal) and predates tmux by two decades. tmux has become the default choice since: panes split more flexibly than screen’s regions, its status line shows more by default, and a scriptable control mode (<code>tmux -CC</code>) lets terminal apps like iTerm2 and Windows Terminal draw tmux panes as native tabs. screen is still preinstalled on more systems out of the box; tmux is one <code>apt install tmux</code> or <code>dnf install tmux</code> away on everything current.</p>
<h2>A minimal ~/.tmux.conf</h2>
<pre><code># Scroll and select with the mouse
set -g mouse on

# Start window and pane numbering at 1, not 0
set -g base-index 1
setw -g pane-base-index 1

# Bigger scrollback buffer (default is 2000 lines)
set -g history-limit 10000

# Reload this file without restarting tmux: Ctrl-b r
bind r source-file ~/.tmux.conf \; display "Reloaded"
</code></pre>
<p>Changes to <code>~/.tmux.conf</code> only apply to new sessions until you reload it: either restart tmux, or use the <code>bind r</code> line above and press <code>Ctrl-b r</code> inside an existing session.</p>
<p>Run a long job inside tmux and an SSH client timeout or a flaky connection (<a href="https://vmheaven.io/blog/troubleshooting/ssh-broken-pipe">SSH: broken pipe</a>) no longer kills it: the session is still there when you reconnect.</p>
<h2>Frequently asked</h2>
<h3>What is the tmux prefix key?</h3>
<p>Ctrl-b by default, pressed and released before the key that follows it, for example Ctrl-b c for a new window. It is not held down together with the next key.</p>
<h3>How do I detach from a tmux session without closing it?</h3>
<p>Press Ctrl-b, then d. The session and everything running inside it keeps going on the server; reattach later with tmux attach or tmux attach -t name.</p>
<h3>How do I scroll up in tmux?</h3>
<p>Enter copy mode with Ctrl-b [, then use the arrow keys, Page Up/Page Down or Ctrl-u/Ctrl-d to move through the scrollback. Press q or Esc to leave copy mode. With 'set -g mouse on' in ~/.tmux.conf, the mouse wheel scrolls directly.</p>
<h3>What is the difference between tmux and screen?</h3>
<p>Both let a terminal session survive a disconnect. tmux has become the default since: more flexible pane splitting, a more informative status line, and a scriptable control mode that terminal apps use to draw tmux panes as native tabs.</p>
]]></content:encoded></item><item><title><![CDATA[Static IP address: what it is, and how to set one on Linux and Windows]]></title><description><![CDATA[What a static IP is, how to tell which one you have, and how to set one with netplan, nmcli and PowerShell.]]></description><link>https://vmheaven.hashnode.dev/static-ip-address-what-it-is-and-how-to-set-one-on-linux-and-windows</link><guid isPermaLink="true">https://vmheaven.hashnode.dev/static-ip-address-what-it-is-and-how-to-set-one-on-linux-and-windows</guid><category><![CDATA[Linux]]></category><category><![CDATA[networking]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[VMHeaven]]></dc:creator><pubDate>Mon, 02 Nov 2026 22:45:00 GMT</pubDate><content:encoded><![CDATA[<blockquote>
<p>First published on the VMHeaven blog: <a href="https://vmheaven.io/blog/guides/static-ip-address">Static IP address: what it is, and how to set one on Linux and Windows</a></p>
</blockquote>
<p><strong>Short answer:</strong> a static IP address is one that stays the same every time a device connects (assigned by hand or reserved for it) instead of being handed out fresh from a pool each time, which is how a dynamic IP works. Below: which one you have, why a server needs a static IP and a home connection usually does not, and how to set one on Debian, Ubuntu, RHEL-family distributions and Windows.</p>
<h2>Static IP vs dynamic IP</h2>
<table>
<thead>
<tr>
<th></th>
<th>Static IP</th>
<th>Dynamic IP</th>
</tr>
</thead>
<tbody><tr>
<td>Assigned by</td>
<td>You, or reserved for your device</td>
<td>DHCP server, from a pool, each time</td>
</tr>
<tr>
<td>Changes?</td>
<td>No, unless you change it</td>
<td>Can change on reconnect or lease renewal</td>
</tr>
<tr>
<td>Typical use</td>
<td>Servers, printers, VPNs, firewall rules</td>
<td>Laptops, phones, most home internet</td>
</tr>
<tr>
<td>Cost</td>
<td>Often a paid add-on from an ISP; included on a VPS</td>
<td>Usually the default, free</td>
</tr>
</tbody></table>
<p>Every VPS, by contrast, gets a static IP from the first boot: the provider assigns it to that virtual machine and it does not change on reboot, which is exactly why you can point a domain’s DNS record at it once and leave it.</p>
<h2>Why a static IP matters</h2>
<p>A DNS A record, a firewall allowlist rule, an SSH <code>known_hosts</code> entry and a VPN peer configuration all point at an IP address directly. If that address can change without warning, every one of those breaks the moment it does. That is the entire reason to care: nothing about a static IP makes a connection faster or more secure by itself, it only makes the address something else can depend on.</p>
<h2>How to tell which one you have</h2>
<p>On a home or office connection, the ISP almost always hands out a dynamic IP unless you asked for and paid for a static one, so check the contract or ask support. On a server you rent, read the provider’s panel: a VPS or dedicated server’s main IP is static by definition, assigned to that machine for as long as you have it.</p>
<pre><code># Linux
ip -4 addr show scope global

# Windows (PowerShell)
Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.PrefixOrigin -ne 'WellKnown' }
</code></pre>
<p>PowerShell’s <code>PrefixOrigin</code> column reads <code>Manual</code> for a static address and <code>Dhcp</code> for one leased from a DHCP server. On Linux, the only way to be sure is to check the configuration file or tool below, because the running address looks identical either way.</p>
<h2>Setting a static IP on Debian and Ubuntu (netplan)</h2>
<p>Both distributions configure networking through netplan since Ubuntu 18.04 and Debian 12. Find your file and interface name first:</p>
<pre><code>ls /etc/netplan/
ip link show   # note the interface name, e.g. eth0 or enp1s0
</code></pre>
<pre><code>network:
  version: 2
  ethernets:
    eth0:
      dhcp4: no
      addresses:
        - 203.0.113.10/24
      routes:
        - to: default
          via: 203.0.113.1
      nameservers:
        addresses: [1.1.1.1, 9.9.9.9]
</code></pre>
<pre><code>sudo netplan try    # shows a preview, reverts automatically if it breaks the connection
sudo netplan apply
</code></pre>
<blockquote>
<p>Run this over a console, not only over SSH, the first time: a typo in the address or gateway drops your SSH session along with the network, and <code>netplan try</code> reverts on its own after 120 seconds with no confirmation, but only if nothing else interrupts it first. On VMHeaven the VNC console in the panel reaches the server even with networking broken.</p>
</blockquote>
<p>A VPS from a provider that uses cloud-init may regenerate <code>/etc/netplan/50-cloud-init.yaml</code> on the next boot and overwrite your edit. If that happens, put the static configuration in a new file instead, such as <code>/etc/netplan/99-static.yaml</code>, which netplan merges on top of the generated one.</p>
<h2>Setting a static IP on RHEL, Rocky and AlmaLinux (nmcli)</h2>
<pre><code>nmcli connection show                 # find the connection name, often "eth0" or "System eth0"

sudo nmcli connection modify eth0 \
  ipv4.addresses 203.0.113.10/24 \
  ipv4.gateway 203.0.113.1 \
  ipv4.dns "1.1.1.1 9.9.9.9" \
  ipv4.method manual

sudo nmcli connection up eth0
</code></pre>
<p><code>nmcli connection modify</code> only edits the saved profile; nothing changes until <code>connection up</code> re-applies it, which briefly drops the interface the same way the netplan apply does. Again, have console access ready.</p>
<h2>Setting a static IP on Windows</h2>
<pre><code># Find the interface alias first
Get-NetAdapter

New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 203.0.113.10 -PrefixLength 24 -DefaultGateway 203.0.113.1
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 1.1.1.1,9.9.9.9
</code></pre>
<p>The same settings are in <strong>Settings → Network &amp; internet → Ethernet → IP assignment → Edit</strong>, switched from “Automatic (DHCP)” to “Manual”, for anyone who would rather not use PowerShell.</p>
<p>The address format above is IPv4; the same static/dynamic distinction applies to <a href="https://vmheaven.io/blog/comparisons/ipv4-vs-ipv6">IPv6 addresses</a>, though most consumer ISPs still hand out only a dynamic IPv6 prefix even on a static IPv4 plan.</p>
<p>Every <a href="https://vmheaven.io/blog/guides/what-is-a-vps">VPS</a> comes with a static IPv4 address included. There is nothing extra to configure on the provider’s side, only inside the operating system if you add a second address or change the default one.</p>
<h2>Frequently asked</h2>
<h3>What is a static IP address?</h3>
<p>An IP address assigned to a device that stays the same every time, rather than being handed out fresh from a pool on each connection the way a dynamic IP is. Servers, VPNs and printers typically use one; most home internet connections use a dynamic one by default.</p>
<h3>Is a static IP more secure than a dynamic one?</h3>
<p>No. The address type itself has nothing to do with security. A static IP is simply predictable, which is exactly what a DNS record, firewall rule or VPN configuration needs to keep working.</p>
<h3>Does my VPS already have a static IP?</h3>
<p>Yes. A VPS or dedicated server's main IP address is static by definition: the provider assigns it to that virtual machine and it does not change on reboot, which is why you can point a domain at it once.</p>
<h3>How do I know if my home internet connection has a static or dynamic IP?</h3>
<p>Check your contract or ask your ISP: most residential connections are dynamic by default, and a static IP is usually a paid add-on. ipconfig (Windows) or ip addr (Linux) only shows the address you currently have, not whether it can change.</p>
]]></content:encoded></item></channel></rss>