Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
FREEDOM251

Freedom251 › Blog › Filesystem

Understanding the Linux Filesystem Layout on a VPS

By Freedom251 Team · · 9 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

On a VPS, /etc holds host configuration, /usr holds mostly shareable programs and resources, and /var holds data that changes while services run. The other directories under / support booting, users, applications, devices, processes, and temporary state. Treat / as the root of a namespace, not automatically as one disk partition: a provider may mount /var, /usr, /home, or an application volume separately.

What the Linux filesystem hierarchy means on a VPS

The Filesystem Hierarchy Standard (FHS) is a convention for placing files so the operating system, packages, scripts, and administrators can interoperate. It defines the purpose of the root filesystem and the major /usr and /var hierarchies, while distributions and applications decide many implementation details.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The slash at the beginning of a path is the namespace root. It does not tell you that every directory is stored on the same virtual disk. A VPS image can use separate filesystems, logical volumes, provider-attached volumes, or bind mounts beneath that tree. Before deleting a large directory, determine whether it is a mount point, a symbolic link, or an ordinary directory.

Essential startup and recovery material must remain reachable from the root filesystem. The FHS allows /usr, /opt, and /var to be separate filesystems, but the boot arrangement must still make required files available when the machine starts.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

The top-level directories at a glance

Path Purpose on a VPS Operational guidance
/ Root of the complete directory tree Keep free space for boot, package, and recovery operations.
/boot Static boot-loader files and kernels Protect it from casual deletion; contents vary by distribution.
/etc Host-specific, static configuration Back up important service settings, but do not use it for changing application data.
/bin Essential user command binaries in the traditional layout Often a symbolic link into /usr/bin on modern systems.
/sbin Essential system and recovery binaries Administrative commands may also be under /usr/sbin or /usr/local/sbin.
/lib and /lib64 Essential shared libraries and kernel modules Usually managed by the distribution; may point into /usr.
/usr Programs, libraries, documentation, and architecture-independent resources Generally shareable and read-only; do not put changing service state here.
/usr/local Software installed by the local administrator Keep local additions distinct from distribution-managed files.
/opt Add-on application packages Useful for self-contained third-party or vendor installations.
/home Ordinary users’ home directories Use a deliberate service account and path for deployed applications.
/root Home directory of the root account Separate from /, despite the similar name.
/srv Data for services provided by the system Use when the distribution or application documents it as the data location.
/var Variable data such as logs, queues, caches, databases, and package state Monitor growth; a full filesystem can stop services and package operations.
/tmp Short-lived temporary files Disposable by policy; never use it for durable backups.
/var/tmp Temporary files intended to survive a reboot Still temporary and subject to cleanup.
/run Volatile runtime state created during boot and service operation Not a normal persistent-data directory.
/dev Device nodes and interfaces Managed runtime state, normally supplied by a device filesystem.
/proc Kernel and process information Generated by the kernel, not ordinary application data.
/sys Kernel and hardware/device model information Generated by the kernel and device-management layers.
/media and /mnt Removable-media and temporary mount points May be unused on a VPS; actual mounts depend on the provider and administrator.

Configuration and software: /etc, /usr, and friends

/etc: static host configuration

The FHS states that the /etc hierarchy contains configuration files. These files describe how this particular machine and its services should operate: network settings, users and groups, service definitions, security policy, scheduled jobs, package repositories, and application configuration. A configuration file controls a program and is static rather than an executable binary.

Start service investigations in /etc, then follow the service documentation for included files and drop-in directories. A web server, database, or SSH daemon may read a main file plus fragments in a subdirectory. Back up the relevant files while preserving ownership and permissions; copying every file in /etc blindly can capture transient host details or secrets you do not intend to restore.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

/usr: distribution-managed programs and resources

The FHS describes /usr as shareable, read-only data. It commonly contains executable programs in /usr/bin, administrative programs in /usr/sbin, libraries in /usr/lib, documentation in /usr/share/doc, and architecture-independent resources in /usr/share. Package managers own most of these files, so manually removing a large-looking directory can break dependencies or leave the package database inconsistent.

/usr/local and /opt

/usr/local is for software and data installed by the local administrator rather than by the operating system’s package set. It is a sensible place for locally compiled utilities when you want them separated from vendor files. /opt is intended for add-on application packages, especially self-contained installations that do not follow the distribution’s normal package layout. Neither location is automatically the correct place for mutable databases, uploads, or logs; follow the application’s documented data path.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

/bin, /sbin, and libraries after the merged-/usr transition

Historically, /bin contained a small set of essential user commands, /sbin held essential system commands, and the corresponding /usr directories held larger collections. Current distributions commonly use a merged-/usr layout: /bin, /sbin, /lib, and sometimes /lib64 are symbolic links into /usr. systemd documents that these paths should be on the root filesystem or be symlinks to the /usr filesystem.

Consequently, seeing both /bin and /usr/bin does not prove that two copies of every command exist or that they are separate disks. Check the resolved path with readlink -f /bin and inspect the package owner with your distribution’s package manager before changing anything.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Users, websites, and application data

/home and /root

/home contains ordinary users’ personal files and shell configuration. On a server, an application should normally run under a dedicated service account with a deliberate directory and restricted permissions rather than being placed casually in an administrator’s home directory. The root account’s home is /root; it is a directory in the root filesystem, not an alternate spelling for /.

/srv, application directories, and mounted volumes

/srv is designated for data served by the system. A distribution or application may document it as the location for website content, repositories, or service data, but many deployments instead use a path under /var/lib, /var/www, /opt, or a separate volume. Do not infer the location from the service name alone. Inspect the service unit, configuration, container definition, or deployment documentation.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord | 6.35mm Jack, Durable Design, Stage and Home Studio Use, Low Noise Shielded Electric Cord for Bass, Keyboard, Amp, Mixer
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Provider images can attach block volumes at any path. A website’s uploads or a database may therefore live outside the original root disk even though the application reaches it through an ordinary directory. Include those mounts in capacity checks and backup plans.

Changing state: understanding /var

The FHS defines /var as the home of variable data, including spool directories and files, administrative and logging data, and transient files. Unlike /usr, its contents change as the machine runs.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

/var/log

Logs and audit-style records normally live under /var/log. Retention, compression, and rotation are distribution- and service-specific. Deleting an active log file can confuse a daemon that still has the file open; use the service’s supported rotation mechanism or the system’s log-management tools. If the filesystem is full, identify the largest service directory and check both ordinary files and deleted files still held open by processes.

/var/lib

/var/lib stores persistent state maintained by applications and system packages: database files, package metadata, service indexes, and other data whose format belongs to a particular program. Back it up when the application depends on it, and restore it using that application’s documented procedure. A raw copy made while a database is writing may not be a consistent backup.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

/var/cache and package state

/var/cache contains re-creatable caches, so it is usually a lower backup priority than /var/lib. It is not universally safe to erase: some programs use cache entries for indexes or downloads, and deleting them can cause a large rebuild or service disruption. Ask the package manager or application to clean its own cache instead of using a recursive deletion.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

/tmp and /var/tmp

/tmp is for temporary files that may be removed according to local policy, including at boot. /var/tmp is also temporary but is intended to survive a reboot. Neither directory is a backup target, durable upload store, or database location. Check permissions before using either for a short-lived operation, and ensure sensitive temporary files are protected from other users.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Virtual and runtime directories

/run

/run is created and populated during boot with volatile state such as process identifiers, sockets, locks, and service metadata. It disappears across a reboot. systemd also requires /var to be writable before the local-filesystem target is reached; this is why a damaged or read-only /var can prevent normal service startup.

/dev, /proc, and /sys

/dev exposes device nodes and interfaces, normally through a managed device filesystem. /proc presents kernel and process information, while /sys presents the kernel’s hardware and device model. These trees are generated views, not ordinary directories to archive. Copying them into a backup wastes space and can produce meaningless files; exclude them unless a specialized diagnostic tool explicitly requires a live view.

How to discover where a VPS is using space

Use read-only inspection first. Run df -hT to see each filesystem’s size, usage, type, and mount point. Then run findmnt to display the mount hierarchy and identify separate volumes. To measure one filesystem without crossing into other mounts, use du -xhd1 /var; repeat for /home, /srv, or an application path as needed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Resolve symbolic links before drawing conclusions: readlink -f /bin shows the destination of a merged-/usr link. Use mountpoint /path to test whether a directory is itself a mount point, and inspect a suspicious file with stat /path for ownership, permissions, and timestamps. If df reports a full filesystem but du cannot account for the space, look for deleted files still open by running processes and restart or signal the responsible service through its normal procedure.

What to back up

A useful backup is organized by function rather than by blindly copying every path below /.

  • Configuration: preserve the service files you need from /etc, including drop-ins, certificates, and access-control settings. Protect secrets during storage and transfer.
  • Persistent application state: identify the service’s documented data directory, often under /var/lib, /srv, /home, /opt, or a dedicated mounted volume. Use an application-consistent export for databases when available.
  • User and site content: include home directories, uploads, repositories, and web content that the service actually serves.
  • Package and runtime trees: normally reinstall /usr, /bin, /sbin, /lib, /dev, /proc, /sys, and /run from the image or package manager instead of archiving them.
  • Caches and temporary files: exclude /tmp, /var/tmp, and re-creatable cache data unless an application’s backup guide specifically requires an item.

Test a restore on a separate instance. A backup that contains configuration but omits a mounted database volume, or contains database files without the matching configuration and credentials, is incomplete even if the archive itself succeeds.

Cleaning without breaking the server

  1. Check capacity with df -hT and locate growth with du -xhd1. Confirm the path is not a separate mount or symlink target.
  2. For logs, use the service’s rotation and retention controls. Do not recursively remove files from /var/log while daemons are writing.
  3. For package downloads, use the distribution’s package-manager cache-clean command rather than deleting package directories by hand. The exact command differs between distributions.
  4. For application caches, use the application’s maintenance command and verify that it can rebuild the cache.
  5. Leave /usr, /lib, /bin, and /sbin under package-manager control. Removing an apparently unused library can make unrelated programs unbootable.
  6. After cleanup, rerun df -hT, inspect service status, and review recent logs. A successful deletion is not proof that the service still has all required state.

Comparing VPS images and distributions

The FHS supplies common meanings, but an image’s implementation determines the paths you will actually administer. When comparing images, check these six points:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Whether the image uses a merged or split /usr layout.
  • Which directories are separate mounts and which share the root filesystem.
  • Where each distribution places service data, logs, and package metadata.
  • Whether /tmp is a volatile mount or an ordinary directory.
  • Which package manager owns system files and how it performs upgrades and cleanup.
  • Which provider volumes, snapshots, or image-specific mount paths are attached.

Two servers can therefore show the same familiar names while having different disk-failure modes. A separate /var may protect the root filesystem from log growth but can itself fill and stop services. A single root volume is simpler to inspect but lets one workload consume space needed by the operating system.

A practical investigation sequence

  1. List the top level with ls -la / and note unusual names, symlinks, and mount-looking directories.
  2. Map filesystems with findmnt and capacity with df -hT.
  3. Classify the path: configuration in /etc, software in /usr, changing state in /var, user or service content in /home or /srv, or live kernel/runtime state in /proc, /sys, /dev, and /run.
  4. Read the service’s unit and configuration to find its actual data directory instead of guessing from convention.
  5. Measure only the relevant filesystem with du -x, then choose a supported backup, rotation, or cleanup operation.
  6. Record the result, including mount points, package ownership, and restore steps, so the next administrator does not have to rediscover the layout.

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.

FilesystemFilesystem Hierarchy StandardLinuxserver administrationVPS

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.