Free tools Windows power users keep installed
One-click scans. No signup required.
On a systemd-based Linux VPS, run sudo hostnamectl set-hostname web-01.example.com, then make sure /etc/hosts maps the VPS address to that fully qualified name and its short name. Verify with hostnamectl status, hostname -f, and getent hosts. This changes the server’s local identity; it does not create a public DNS record.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
The reliable procedure in brief
Choose a DNS-compatible name, set it with hostnamectl, align the local address entry in /etc/hosts, and test both the running value and the files that survive a reboot. For example:
As an Amazon Associate I earn from qualifying purchases.
sudo hostnamectl set-hostname web-01.example.com
sudoedit /etc/hosts
hostnamectl status
hostname -f
getent hosts web-01.example.com
The exact address line depends on how the VPS is configured. A server with a static IPv4 address commonly uses that address in /etc/hosts; a Debian-style DHCP image may use 127.0.1.1 for the local name instead. Keep the existing localhost entries intact.
Choose a hostname that will keep working
Use DNS-style characters
A static Linux hostname should use DNS-compatible labels: letters, digits, and hyphens. Do not use spaces, slashes, underscores, shell punctuation, or an arbitrary sentence. Keep the complete name at 64 characters or fewer, which is the Linux limit documented for static and transient hostnames.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
A short name such as web-01 is one label. A fully qualified domain name (FQDN), such as web-01.example.com, contains the host label and its domain. Either can be valid as the local static value, but the choice should match the software and automation that manage the VPS.
Decide whether the static value should be short or fully qualified
| Choice | Use it when | What you must provide |
|---|---|---|
web-01 |
Provider tooling or an application expects one DNS label, or the server has no meaningful domain name. | Map the short name locally; use an FQDN separately if services require one. |
web-01.example.com |
You operate a domain and want commands such as hostname -f to return the service name. |
Map both the FQDN and short name in /etc/hosts, and create public DNS separately if Internet clients must resolve it. |
Before choosing, check whether your VPS provider or cloud-init image expects a particular naming convention. A valid static hostname normally takes precedence over a transient name supplied by DHCP or NetworkManager, but an image policy can still rewrite files or settings later.
What /etc/hostname and /etc/hosts actually do
/etc/hostname: the persistent local name
/etc/hostname is a local file containing the system’s persistent hostname. It should contain one newline-terminated string, normally without a comment or additional fields. During boot, systemd reads this file and applies the value through the kernel’s hostname mechanism. Changing the file establishes what should return after a reboot; it does not by itself guarantee that the currently running kernel value changes immediately.
/etc/hosts: local name resolution
/etc/hosts is a local name-resolution database. It associates an address with one or more names before the system needs to ask configured DNS servers. It is where you normally place the VPS’s local FQDN and short name so that commands, package tools, mail software, and sudo can resolve the machine’s own name.
This file is not public DNS. Editing it does not publish an A or AAAA record and does not make the name resolvable from another computer. If an Internet-facing FQDN is required, create or change the corresponding DNS records with the authority for your domain.
Static, transient, and pretty hostnames
Systemd distinguishes three values. The static hostname is the durable machine name, normally stored in /etc/hostname. A transient hostname can arrive from network configuration such as DHCP. A pretty hostname is an unrestricted, human-readable label intended for display. hostnamectl reports these values and manages the static value used for ordinary server operation. A valid static hostname normally wins over a transient one.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Inspect the current state before changing anything
Log in through your VPS console or SSH session and record the current configuration. These commands do not modify the server:
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
hostnamectl status
hostname
cat /etc/hostname
getent hosts "$(hostname)"
hostnamectl statusshows the operating system, kernel, architecture, and hostname fields known to systemd.hostnameprints the name currently held by the running kernel.cat /etc/hostnameshows the persistent file that systemd will read at boot.getent hosts "$(hostname)"asks the system’s configured name-service stack whether the current name resolves locally.
Save the existing /etc/hosts content or inspect it before editing. In particular, note the current IPv4 localhost line, IPv6 localhost lines, and any provider-specific entries. Do not delete those entries simply because you are adding a new hostname.
Set the hostname with hostnamectl
On distributions using systemd, this is the preferred method because it applies the running value and writes the persistent configuration:
sudo hostnamectl set-hostname web-01.example.com
Replace the example with your chosen name. The command normally returns no output on success. Open a new shell, or inspect the current one, if you want a prompt that displays the new value; an existing shell prompt may not redraw automatically.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallConfirm both the static and runtime values immediately:
hostnamectl status
hostname
cat /etc/hostname
The first command should show the new static hostname, hostname should print the same effective local name, and the file should contain the intended value followed by a newline. A reboot is not normally required for the change to take effect.
Make /etc/hosts agree with the new name
Static IPv4 address
If the VPS has a stable private or public IPv4 address assigned to its interface, put the FQDN first and the short name second on that address line. For example:
203.0.113.10 web-01.example.com web-01
Use the actual address assigned to the server, not the documentation address in the example. Keep the standard localhost mappings, such as:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesRank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
Do not place the machine’s name on the 127.0.0.1 localhost line unless your distribution’s documented configuration specifically calls for it. Mapping the server name to its own real address makes the relationship explicit and avoids confusing applications that distinguish localhost from the host’s interface address.
Debian-style DHCP configuration
Some Debian and Ubuntu VPS images use a loopback alias for the machine’s local name:
127.0.1.1 web-01.example.com web-01
This line can coexist with 127.0.0.1 localhost. Follow the convention already used by the image and its network configuration rather than adding a second, conflicting mapping. If you are unsure which address is intended, inspect existing entries and the provider’s image documentation before changing them.
IPv6 and multiple addresses
If the server has a stable IPv6 address and applications must resolve the hostname over IPv6, add an appropriate IPv6 mapping as well. Do not guess an address: use the address actually assigned to the VPS. A hostname can have separate local IPv4 and IPv6 entries, but each must reflect the interface configuration that will remain valid after a restart.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Edit safely
Use a root editor so permissions and ownership remain unchanged:
sudoedit /etc/hosts
Add or update one line for the machine name, preserving comments and unrelated host entries. Save the file, then test resolution before closing your administrative session. A malformed hosts file can affect package downloads, authentication, monitoring, and future SSH connections.
Verify the result without rebooting
Run the following checks after both files are aligned:
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
hostnamectl status
hostname
hostname -f
cat /etc/hostname
getent hosts web-01.example.com
getent hosts web-01
Interpret each check
hostnamectl statusshould show the intended static hostname rather than an old value supplied by a transient network setting.hostnameconfirms what the running kernel reports.hostname -fasks the resolver for the fully qualified name. It should return the FQDN if your hosts entry and resolver configuration provide one.cat /etc/hostnameconfirms persistence on disk.getent hoststests the same name-service path used by many ordinary applications. A successful result should show the expected address and name.
Test the exact spelling, including hyphens and domain suffixes. A successful lookup of the short name does not prove that the FQDN is mapped, and the reverse is also true.
Manual fallback when hostnamectl is unavailable
Minimal images, non-systemd installations, and rescue environments may not provide hostnamectl. In that case, edit the persistent file as root so it contains exactly one intended hostname:
sudoedit /etc/hostname
Then update the matching /etc/hosts entry using the address convention appropriate to the image. On systems that provide the legacy command, apply the running value with:
sudo hostname web-01.example.com
The legacy command changes the current kernel value but may not write /etc/hostname, which is why both operations matter. If the init system has no equivalent runtime command, reboot after editing the file so the boot process reads it. The exact behavior depends on the init system; the hostnamectl path is the documented method for systemd distributions.
Distribution and VPS-image considerations
Debian and Ubuntu
Common Debian and Ubuntu images use /etc/hostname for the persistent name and support hostnamectl set-hostname when systemd is present. Their /etc/hosts convention may use either the VPS address or 127.0.1.1, especially on DHCP-oriented installations. Preserve the pattern already present in the image.
Red Hat Enterprise Linux and related systems
Red Hat Enterprise Linux documents the same systemd command and stores the static value in /etc/hostname. The command and file layout therefore align with other mainstream systemd VPS images, although network-management defaults and provider templates can differ.
cloud-init and provider automation
Cloud-init, NetworkManager, DHCP hooks, or a provider’s first-boot scripts may set or rewrite a hostname. A change that looks correct immediately after login can be replaced at the next boot or network restart if the image is configured to manage the name. If persistence matters, inspect cloud-init’s hostname settings and the provider image’s initialization policy, then reboot during a maintenance window and repeat the verification commands.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Troubleshoot common failures
sudo: unable to resolve host
This warning usually means the running hostname does not match any usable local mapping. Check all three values:
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →hostname
cat /etc/hostname
getent hosts "$(hostname)"
Then ensure the current short name and, when applicable, its FQDN appear together on the correct local-address line in /etc/hosts. For example, if hostname returns web-01, a line containing web-01.example.com web-01 must be resolvable. Correct the spelling and address, save the file, and rerun sudo or getent. The hostname itself may already have changed successfully; the warning concerns name resolution.
hostname -f prints the wrong value or fails
This indicates that the resolver cannot derive an FQDN from the current name. Confirm that the FQDN appears before the short name on the relevant /etc/hosts line and that the line uses the server’s actual address or the image’s documented loopback alias. Also check for duplicate lines that map the same name to different addresses. Remove stale duplicates, then test with getent hosts your-fqdn.
The name changes back after reboot
Compare the value before and after reboot with hostnamectl status and cat /etc/hostname. If the file has reverted, cloud-init or provider automation likely rewrote it. If the file is correct but the runtime value differs, a network service may be supplying a transient name. Inspect the image’s initialization configuration and network-manager policy rather than repeatedly editing the same file.
The command rejects the hostname
Remove spaces and punctuation that are not valid in DNS-style labels, shorten the name to 64 characters or fewer, and use hyphens instead of underscores. Check for an accidental trailing space or newline beyond the normal line ending in /etc/hostname. A name that is valid as a pretty display label may still be invalid as a static hostname.
Remote SSH access is at risk
Changing a hostname normally does not change the VPS address, SSH port, user accounts, or keys. However, an incorrect hosts edit can interfere with authentication, package operations, or monitoring. Keep your current SSH session open while testing, and maintain a provider console or out-of-band recovery path before editing network-related files.
Hostname changes versus public DNS
There are two separate operations. The local operation sets the kernel name, writes /etc/hostname, and supplies local resolution through /etc/hosts. The public operation creates DNS records at your domain’s authoritative DNS service. If clients on the Internet must reach web-01.example.com, create the appropriate A record for IPv4 and/or AAAA record for IPv6 in addition to the local configuration. Neither hostnamectl nor /etc/hosts publishes those records.
A repeatable checklist
- Choose a DNS-compatible short name or FQDN no longer than 64 characters.
- Check the existing state with
hostnamectl status,hostname,cat /etc/hostname, andgetent hosts. - Run
sudo hostnamectl set-hostname NEWNAMEon a systemd VPS. - Open
/etc/hostswithsudoeditand map the actual local address, FQDN, and short name according to the image’s convention. - Preserve localhost and IPv6 localhost entries.
- Verify the runtime value, persistent file, FQDN lookup, and short-name lookup.
- Check cloud-init or provider policy if the name must survive reboot.
- Create public DNS records separately when outside clients need to resolve the name.
Once these checks agree, the VPS has a consistent local identity: the running kernel reports the selected name, /etc/hostname preserves it for boot, and /etc/hosts lets local software resolve it without depending on public DNS.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




