LogoLogo
  • Home
  • Getting Started
  • Configuration
    • LinuxGSM Config
    • Game Server Config
    • Start Parameters
    • cronjobs
    • Running on Boot
    • Running Multiple Game Servers
    • IP Address Configuration
    • LinuxGSM Stats
  • Commands
    • install
    • start-stop-restart
    • monitor
    • test-alert
    • console
    • debug
    • update
    • check-update
    • force-update
    • validate
    • update-lgsm
    • backup
    • map-compressor
    • details
    • mods
    • skeleton
    • fastdl
    • change-password
  • Game Servers
    • 7 Days to Die
    • Arma 3
    • ARK: Survival Evolved
    • Call of Duty 4
    • Dont Starve Together
    • Counter-Strike 2
    • Counter-Strike: Global Offensive
    • Factorio
    • Garry's Mod
    • Insurgency: SandStorm
    • Killing Floor 2
    • Minecraft: Java Edition
    • Multi Theft Auto
    • Rust
    • Sven Co-op
    • Trackmania Nations Forever / Trackmania United Forever
    • TeamSpeak 3
    • Unreal Tournament 99
    • Unreal Tournament 2004
    • Unreal Tournament 3
    • Valheim
    • Xonotic
    • The Front [WIP]
  • Networking
    • IP Address
    • Ports
    • Source Engine
  • Alerts
    • Discord
    • Email
    • IFTTT
    • Pushbullet
    • Pushover
    • Rocket.Chat
    • Slack
    • Telegram
  • Dependencies
    • Java
    • tmux
    • jq
    • gamedig
    • glibc
  • Features
    • ANSI Colors
    • Stop Mode
    • Log Management
    • Message Display Time
  • SteamCMD
    • Steam Master Server
    • Game Server Login Token
    • Branch
    • LAN Discovery
    • Workshop
    • Error Codes
  • Linux
    • distro
    • ftp-scp
    • file-ownership
    • firewalls
    • network-interfaces
    • permissions
    • Symlinking and ln command
  • Troubleshooting
  • FAQ
  • Guides
    • Security
    • Make Webserver Case Insensitive
    • Sourcemod and Metamod:Source
  • Other
    • server-migration
    • basic-usage
    • brand
Powered by GitBook
On this page
  • Using Symlinks to Save Storage Space
  • Symlink resources
Edit on GitHub
Export as PDF
  1. Linux

Symlinking and ln command

Symlinks create multiple paths to a file or directory and are useful for saving space or having 1 set of files for multiple installs.

Using Symlinks to Save Storage Space

This guide is for pointing multiple directories to the same folder using ln command. Ln creates hardlinks and softlinks, the -s variable creates softlinks. These can be compared to shortcuts on windows, and are going to be used in this guide.

Example guide using two "one server + one user" installs with Sven Co-op:

Gameserver folder 1: /home/svencoop/serverfiles/svencoop_downloads/

Gameserver folder 2: /home/svencoop2/serverfiles/svencoop_downloads/

Shared folder /home/svencoop_content/svencoop_downloads/

The command to link these would be ln -s /shared_folder/ /gameserver_folder/

ln -s /home/svencoop_maps/svencoop_downloads/ /home/svencoop/serverfiles/

ln -s /home/svencoop_maps/svencoop_downloads/ /home/svencoop2/serverfiles/

Change the game server folder ownership to be under their respective users and you are done.

chown svencoop /home/svencoop/serverfiles/svencoop_downloads

chown svencoop2 /home/svencoop2/serverfiles/svencoop_downloads

The files in the symlinks do not need be owned by the gameserver users and will not be recognized by linuxGSM's ownership check. That being said, make sure they can be read by the gameserver users.

Symlink resources

PreviouspermissionsNextTroubleshooting

Last updated 1 year ago

Excellent description of differences between Symlinks and Hardlinks by OSTechNix
Official Ubuntu ln Documentation