Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
/etc is the standard Unix/Linux directory for host-specific system configuration: local, system-wide files that tell installed programs and services how one machine, virtual machine, container, or image should operate. It is normally part of the root filesystem and is needed early in boot. The Filesystem Hierarchy Standard (FHS) defines configuration files as local, non-executable control files; application binaries and runtime state belong elsewhere.
The important operational qualification is that /etc is a configuration interface, not always the component doing the work. A file may be read directly, generated by NetworkManager or cloud-init, represented by a symlink into /run, or superseded by a systemd drop-in. Before editing anything, identify which program owns and consumes it.
What “host-specific” means
“Host-specific” means configuration for one installed system, rather than generic program data shipped under /usr or personal preferences kept in a user’s home directory. The host can be bare metal, a VM, cloud instance, container, or immutable image; it does not have to be unique hardware.
| Scope | Typical location | Example |
|---|---|---|
| Persistent host configuration | /etc |
/etc/hostname |
| Runtime/generated state | /run |
Generated resolver data |
| Kernel and device state | /proc, /sys |
Kernel settings and devices |
| Installed software | /usr, /opt |
Program files |
| Logs, queues, caches | /var |
Service logs |
| User preferences | /home, often ~/.config |
Per-user shell settings |
The name is often explained historically as “et cetera,” but the FHS definition is functional: /etc contains host-level configuration. Configuration normally goes in subdirectories such as /etc/ssh, /etc/systemd, or /etc/NetworkManager. Software installed under /opt conventionally uses /etc/opt/<application>.
#1 Best Overall
- Entry-level NAS Personal Storage:UGREEN NAS DH2300 is your first and best NAS made easy. It is designed for beginners who want a simple, private way to store videos, photos and personal files, which is intuitive for users moving from cloud storage or external drives and move away from scattered date across devices. This entry-level NAS 2-bay perfect for personal entertainment, photo storage, and easy data backup (doesn't support Docker or virtual machines).
- Set Your Devices Free, Expand Your Digital World: This unified storage hub supports massive capacity up to 64TB.*Storage drives not included. Stop Deleting, Start Storing. You can store 22 million 3MB images, or 2 million 30MB songs, or 43K 1.5GB movies or 67 million 1MB documents! UGREEN NAS is a better way to free up storage across all your devices such as phones, computers, tablets and also does automatic backups across devices regardless of the operating system—Window, iOS, Android or macOS.
- The Smarter Long-term Way to Store: Unlike cloud storage with recurring monthly fees, a UGREEN NAS enclosure requires only a one-time purchase for long-term use. For example, you only need to pay $459.98 for a NAS, while for cloud storage, you need to pay $719.88 per year, $2,159.64 for 3 years, $3,599.40 for 5 years. You will save $6,738.82 over 10 years with UGREEN NAS! *NAS cost based on DH2300 + 12TB HDD; cloud cost based on 12TB plan (e.g. $59.99/month).
- Blazing Speed, Minimal Power: Equipped with a high-performance processor, 1GbE port, and 4GB RAM on Board, this NAS handles multiple tasks with ease. File transfers reach up to 125MB/s—a 1GB file takes only 8 seconds. Don't let slow clouds hold you back; they often need over 100 seconds for the same task. The difference is clear.
- Let AI Better Organize Your Memories: UGREEN NAS uses AI to tag faces, locations, texts, and objects—so you can effortlessly find any photo by searching for who or what's in it in seconds. It also automatically finds and deletes similar or duplicate photo, backs up live photos and allows you to share them with your friends or family with just one tap. Everything stays effortlessly organized, powered by intelligent tagging and recognition.
The files you encounter most often
| Path | Purpose | Editing caution |
|---|---|---|
/etc/hostname |
Persistent static hostname in the systemd model | May be changed by cloud or provisioning tools |
/etc/hosts |
Local IP-to-name mappings | Does not publish DNS records; NSS controls whether it is consulted |
/etc/resolv.conf |
Resolver nameservers, search domains, and options | Often a symlink or generated file |
/etc/nsswitch.conf |
Sources and order for accounts, hosts, services, and more | Affects many applications; syntax and modules vary |
/etc/fstab |
Persistent filesystem mounts | Errors can cause emergency-mode boot |
/etc/passwd, /etc/shadow, /etc/group |
Local account and group databases | Use account-management commands instead of hand editing |
/etc/systemd/system/ |
Administrator units and overrides | Prefer drop-ins over copying vendor units |
/etc/ssh/sshd_config |
SSH daemon policy | Run sshd -t before reloading |
/etc/profile.d/ |
System-wide login-shell snippets | Not every shell, service, or GUI session reads it |
Hostname, hosts, DNS, and NSS are different layers
/etc/hostname: the local identity
On systemd-based Linux, /etc/hostname normally contains one newline-terminated static hostname. Comments beginning with # are ignored. The systemd documentation recommends a DNS-compatible single label for the static hostname and documents a maximum of 64 characters. A human-readable “pretty” hostname is a separate field.
hostname
hostnamectl status
cat /etc/hostname
To set the persistent hostname on a system with systemd hostnamed:
sudo hostnamectl set-hostname server01
hostnamectl status
hostname
For a display name that is not suitable as a DNS label:
sudo hostnamectl set-hostname "Application Server" --pretty
hostnamectl is not universal Unix functionality. It requires systemd integration. Changing the local hostname also does not create DNS records, update certificates, alter monitoring inventories, or guarantee that cloud-init will not change it again.
/etc/hosts: a local static table
The hosts(5) manual defines records as an address followed by a canonical name and optional aliases:
127.0.0.1 localhost
127.0.1.1 server01.example.test server01
::1 localhost ip6-localhost ip6-loopback
The 127.0.1.1 convention is distribution-dependent; do not assume every system uses it. Entries are useful for loopback identity, isolated networks, temporary overrides, testing, and bootstrapping. They affect local lookups only and do not publish anything to the wider network.
Rank #2
- LINUX COMMANDS. ZERO SEARCHING. – Keep essential Linux and Unix command lines directly beneath your fingertips, so you can code, troubleshoot and work faster without breaking focus.
- YOUR DESK. SMARTER. – Commands are clearly grouped by networking, directory navigation, processes, users, files and system management for quick answers exactly when you need them.
- BUILT FOR EVERY LINUX USER – A practical go-to reference for beginners and seasoned programmers working with Kali, Red Hat, Ubuntu, openSUSE, Arch, Debian and other distributions.
- ROOM TO CODE, WORK & PLAY – The extended 31.5 x 11.8-inch Pixiecube desk mat provides ample space for a laptop or keyboard and mouse, while the soft 2 mm surface adds everyday comfort.
- BUILT FOR REAL-WORLD WORKDAYS – A rugged stitched edge helps prevent fraying, and the water-resistant, stain-resistant surface protects against scratches, spills and everyday wear—because smarter desks should work harder.
Whether an application consults this file, and in what order, depends on /etc/nsswitch.conf. Check the actual path with:
Recommended Free Tools
grep '^hosts:' /etc/nsswitch.conf
getent hosts server01
getent hosts server01.example.test
getent exercises the system’s Name Service Switch path. Tools such as dig query DNS directly and therefore may not reproduce what ordinary applications do.
/etc/resolv.conf: resolver-client settings
The resolv.conf(5) manual documents directives such as nameserver, search, and options. This file configures a resolver library; it is not a DNS server and cannot create DNS records.
ls -l /etc/resolv.conf
readlink -f /etc/resolv.conf
cat /etc/resolv.conf
resolvectl status
getent hosts example.com
Never replace it blindly. NetworkManager, DHCP clients, VPN software, cloud-init, or systemd-resolved may regenerate it. On systemd-resolved systems, durable settings may belong in /etc/systemd/resolved.conf or /etc/systemd/resolved.conf.d/, as described in the resolved.conf documentation.
/etc/nsswitch.conf: who gets asked
NSS controls sources for databases such as passwd, group, shadow, hosts, services, and networks. A line such as hosts: files dns usually checks local files before DNS, but systems may include resolve, myhostname, LDAP, mDNS, or other modules. The installed modules and distribution configuration determine exact behavior.
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 glitchesOther important configuration areas
Filesystems: /etc/fstab
fstab describes filesystems, mount points, types, options, dump settings, and filesystem-check order. Review edits carefully, especially for network or removable filesystems:
Rank #3
- MODEL P74439-005: Compact and affordable HPE ProLiant MicroServer Gen11 powered by Intel Pentium Gold G7400 3.7GHz processor, ideal for file sharing, NAS, and basic business workloads
- READY OUT OF THE BOX: Includes 16GB DDR5 UDIMM memory (expandable to 128GB), one 1TB SATA 6G Business Critical HDD, embedded Intel VROC SATA, dedicated iLO-M.2 port kit, 180w external power adapter and 1/1/1 warranty for dependable plug-and-play server operation
- WHISPER-QUIET & SPACE-SAVING: Ultra-compact mini tower design fits easily in small office spaces; supports wall, flat, or vertical placement for deployment flexibility
- INTEGRATED REMOTE MANAGEMENT: Comes with HPE iLO 6 and embedded TPM 2.0 for secure, license-free remote server administration through shared port access
- EXPANDABLE DESIGN: Two PCIe slots (including PCIe 5.0) and four LFF-NHP drive bays provide robust options for storage and component scalability. Features new MR408i-p controller support for enhanced storage performance
findmnt --verify
sudo mount -a
mount -a attempts to mount eligible entries and can have side effects. A wrong UUID, unavailable device, bad option, or missing nofail can delay boot or trigger emergency mode.
Accounts and authentication
/etc/passwd contains account metadata such as names, IDs, home directories, and shells. Modern systems normally keep password hashes in the protected /etc/shadow; /etc/group and /etc/gshadow hold group data. Prefer useradd, usermod, passwd, and groupadd. Protect backups because they may contain hashes or other sensitive data.
Other security-sensitive files include /etc/sudoers and files under /etc/sudoers.d/. Validate sudo policy with visudo, not a generic editor.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Shell and login defaults
/etc/profile initializes login shells; /etc/profile.d/ provides modular snippets. Some distributions provide /etc/bash.bashrc. /etc/shells lists permitted login shells, while /etc/motd and /etc/issue provide login messages. Names and loading rules differ across shells and distributions, and these files do not automatically configure services or every SSH command.
Services and systemd
Vendor unit files commonly reside in /usr/lib/systemd/system or /lib/systemd/system. Administrator units and overrides belong in /etc/systemd/system. Do not edit vendor files: package upgrades can replace them. Prefer a drop-in created with systemctl edit example.service, then apply and inspect it:
sudo systemctl edit example.service
sudo systemctl daemon-reload
sudo systemctl restart example.service
systemctl status example.service
journalctl -u example.service
Some systemd components use separate global drop-in directories such as /etc/systemd/*.conf.d/. Their precedence is component-specific; consult that component’s manual.
Rank #4
Dynamic linker paths
/etc/ld.so.conf and /etc/ld.so.conf.d/ add library search paths for systems using ldconfig:
sudo ldconfig
ldconfig -p
Never add writable or untrusted directories casually. A malicious shared library in such a path can enable code execution or break system programs.
SSH and scheduled jobs
Before reloading SSH, validate its configuration:
sudo sshd -t
sudo systemctl reload ssh
The service may be named ssh or sshd. Keep console or out-of-band access when changing remote login policy. System-wide cron configuration commonly uses /etc/cron.* and /etc/cron.d/; exact syntax and ownership requirements depend on the cron implementation.
How to determine who owns a file
Use inspection before editing:
stat /etc/hosts /etc/hostname /etc/resolv.conf
ls -l /etc/resolv.conf
systemctl is-active NetworkManager
systemctl is-active systemd-resolved
systemctl is-active systemd-networkd
cloud-init status
“Unit not found” is normal when a distribution does not use that service. Also check for container or image-management behavior. A reboot, DHCP renewal, package update, or image replacement may regenerate a file even if your manual edit was correct.
A safe editing workflow
- Identify the owner. Check symlinks, active network managers, generators, and documentation.
- Back up the original.
sudo cp -a /etc/example.conf /etc/example.conf.bak - Edit with privilege safely.
sudoedit /etc/example.conf - Run the subsystem validator. Examples include
sudo sshd -t,findmnt --verify,visudo, or a service-specific check. - Reload or restart only what is necessary. Use
daemon-reloadafter unit changes. - Test through the real path. Use
getentfor name service,systemctl statusandjournalctlfor services, and a controlled mount test forfstab. - Keep rollback access. Remote administrators should retain console or provider recovery access for risky SSH, sudo, mount, and resolver changes.
Common failures and recovery
Hostname changed, but applications still fail
Check for a missing local mapping, absent DNS record, an application expecting an FQDN, stale certificates or Kerberos principals, monitoring inventory mismatches, or a provisioning agent that reverted the name:
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →hostnamectl status
hostname --fqdn
getent hosts "$(hostname)"
cat /etc/hosts
A successful hostnamectl command does not update DNS or external systems.
Best Value
- 【AMD Ryzen 7330U】 – The Efficiency-Tuned Powerhouse,AMD Ryzen 7330U (Zen 3, SMT, 4C/8T) in KAMRUI P2 mini PC crushes rivals: Intel i3-10110U (2C/4T, 2019) and N95 (4 efficiency cores, no HT, single-channel memory). Vs predecessor Ryzen 3 4300U (4C/4T): ~50% faster single-core, ~46% multi-core, 8MB L3 cache (vs 4MB). Beats both Intel chips hugely in multi-core, making heavy multitasking, coding, data work smooth at just 15W TDP. High-end power in a cool, efficient box.
- 【AMD Radeon Graphics】– Triple 4K Vision & Fluidity,The integrated Radeon Graphics (based on the modern Vega architecture with 6 CUs) is a visual beast, outclassing the iGPU offerings from both AMD's prior generation and Intel. The Intel UHD Graphics (i3-10110U/N95) struggles with single-channel memory and low execution units, crippling its gaming performance and barely handling basic 4K video without stuttering. While the older Radeon Vega 5 (4300U) was decent, our 7330U's Radeon Graphics (6 CUs) pushes the boundaries, delivering higher graphics clock speeds (up to 1.8GHz) and significantly better rendering capabilities. It can drive triple 4K@60Hz displays with zero lag, edit photos/videos.
- 【Generous Storage & Easy Expansion】The KAMRUI Pinova P2 mini desktop computers comes with 16GB LPDDR4X RAM (higher frequency, lower power) for buttery‑smooth multitasking, and a 256GB M.2 SSD for blazing fast boot‑up, quick file transfers, and no more long loading screens. It also features two storage expansion slots (1x M.2 2280 SATA/NVMe PCIe 3.0 slot + 1x M.2 2280 SATA slot), supporting up to 4TB total (not included). You’ll have all the space you need for projects, media, and important data.
- 【Triple 4K Display Output】The KAMRUI Pinova P2 mini desktop pc is equipped with HDMI 2.0 ×1 + DP 1.4 ×1 + USB 3.2 Gen2 Type‑C ×1 (with DP Alt Mode), enabling simultaneous triple 4K@60Hz output. Whether for home entertainment, remote work, or conference room presentations, it delivers an immersive visual experience. Two USB 3.2 Gen2 Type‑A ports (up to 10Gbps – 21x faster than USB 2.0) make data transfers and device expansion a breeze.
- 【USB 3.2 Gen2 Type‑C: 10Gbps & Versatile Connectivity】The USB 3.2 Gen2 Type‑C port on the KAMRUI P2 small pc supports 10Gbps data transfer speeds and can also output DisplayPort 1.4 video. Together with Gigabit LAN, Wi‑Fi, and Bluetooth, you get a fast, flexible, and productive connected environment – wired or wireless.
Resolver edits disappear
Inspect the symlink target and active manager:
ls -l /etc/resolv.conf
readlink -f /etc/resolv.conf
resolvectl status
nmcli general status
Configure the responsible manager instead of repeatedly overwriting its generated output.
/etc/hosts appears ignored
Check that NSS includes files, that the name matches exactly, and that you are not testing with a DNS-only tool:
grep '^hosts:' /etc/nsswitch.conf
getent hosts name.example
IPv6 preference, caching, application-specific resolvers, and alternate NSS modules can also change the result.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11fstab breaks boot
Use rescue or emergency mode, or a live environment if necessary. Remount the root filesystem read-write, restore the backup or comment out the faulty entry, then review with findmnt --verify. Test with mount -a only after checking device availability, network ordering, and options.
Containers, cloud images, and immutable systems
Containers often have a minimal or synthetic /etc. The runtime may inject /etc/hostname, generate /etc/hosts, and mount or replace /etc/resolv.conf. Many containers lack systemd, so hostnamectl, systemd-resolved, and systemd unit management may not exist.
Cloud-init and provider agents can rewrite identity and network files at first boot or on every provisioning cycle. Image-based or immutable operating systems may expose /etc as an overlay or managed writable layer; changes may need to be made through image-building or provisioning mechanisms and can disappear after replacement or rollback. These are implementation differences, not contradictions of the FHS.
When to edit directly—and when not to
Direct editing is reasonable for a documented static file that a known service reads directly, provided you have validation and rollback. Use a management command or declarative tool when NetworkManager, DHCP, cloud-init, systemd generators, a container runtime, or configuration management owns the state; when several related changes must remain consistent; or when changes must be repeatable across a fleet. Version-controlled templates and secret-management systems are safer than ad hoc public repositories.
Free tools Windows power users keep installed
One-click scans. No signup required.
Quick inspection checklist
ls -la /etc
hostnamectl status
cat /etc/hostname
cat /etc/hosts
readlink -f /etc/resolv.conf
cat /etc/resolv.conf
grep '^hosts:' /etc/nsswitch.conf
getent hosts localhost
findmnt --verify
systemctl status systemd-resolved
The central rule is simple: /etc is the persistent, host-level configuration layer, but the active behavior depends on the program or manager that consumes or generates each path. Treat ownership, validation, and rollback as part of every configuration change.
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.

