Linux कमांड तुम्हें Gameserver को नियंत्रित तरीके से जांचने, फाइलें manage करने, processes देखने और logs में errors ढूंढने में मदद करते हैं. game-serverhosting में technical control, support और traceable workflows पर focus है: तुम कई routine tasks आराम से manage कर सकते हो, लेकिन अगर तुम गहराई से analysis करना या manually हस्तक्षेप करना चाहते हो, तो सबसे जरूरी terminal commands जानना चाहिए.

आवश्यकताएं

नीचे दिए गए commands के लिए तुम्हें एक Linux server या enabled SSH/terminal access, सही user permissions और अपने Gameserver directory का path चाहिए. जितना हो सके, root के रूप में बिना सोचे काम मत करो. अगर तुम configuration files बदलते हो, तो पहले copy बनाओ और document करो कि तुमने क्या adjust किया है.

अगर तुम files को graphical client से manage करना पसंद करते हो, तो Gameserver files के लिए SFTP access वाला guide भी उपयोगी है. In-game admin commands अलग topic हैं: Valheim के लिए ये Valheim Server commands और admin commands guide में मिलेंगे, Rust के लिए Rust Server commands और admin commands guide में.

फाइल सिस्टम

इन commands से तुम directory tree में orientation लेते हो और files या folders बदलते हो. Risky actions से पहले हमेशा current path को pwd से और content को ls -la से check करो.

ls -la                    # फाइलें दिखाएं
cd /home/server           # folder बदलें
pwd                       # current path दिखाएं
cp datei.txt backup.txt   # file copy करें
mv alt.txt neu.txt        # file rename/move करें
rm datei.txt              # file delete करें
mkdir ordner              # folder बनाएं
chmod +x start.sh         # executable बनाएं

cp individual configuration files के quick backups के लिए अच्छा है. mv files को rename या move कर सकता है. rm recycle bin के बिना delete करता है; इसलिए इसे तभी use करो जब filename और path सही हों. chmod +x start.sh से तुम start script को executable बनाते हो, अगर server missing execute permissions की वजह से start नहीं हो रहा.

Processes

Process commands तुम्हें दिखाते हैं कि Gameserver चल रहा है या नहीं, CPU और RAM पर कितना load है और targeted restart के लिए कौन सी process ID चाहिए.

ps aux | grep server      # processes खोजें
top                       # CPU/RAM overview
htop                      # बेहतर overview
kill <PID>                # process बंद करें
kill -9 <PID>             # process force करें
screen -S server          # screen session start करें
screen -r server          # session resume करें

kill <PID> process को normal तरीके से बंद करता है. kill -9 <PID> forcefully बंद करता है और exception रहना चाहिए, क्योंकि server शायद clean save या shutdown steps पूरा न कर पाए. screen तब useful है जब SSH session बंद करने के बाद भी server process चलते रहना चाहिए.

Network

Network commands तुम्हें port openings, reachability और firewall rules check करने में मदद करते हैं. यह खास तौर पर important है जब server locally चल रहा हो, लेकिन game browser में दिखाई न दे.

netstat -tulpn            # open ports दिखाएं
ss -tulpn                 # modern alternative
ping 8.8.8.8              # connection test करें
traceroute server.de      # route trace करें
iptables -L               # firewall rules
ufw status                # UFW status
ufw allow 25565/tcp       # port खोलें

ss -tulpn कई current Linux systems पर listening TCP और UDP ports देखने के लिए preferred choice है. ping basic reachability check करता है, लेकिन यह नहीं बताता कि game port open है या नहीं. ufw allow 25565/tcp port opening का example है; port और protocol को अपने game के values से replace करो.

Files edit करना और logs पढ़ना

Logs अक्सर cause तक पहुंचने का fastest way होते हैं: missing mod files, गलत start parameters, port conflicts या damaged configurations आम तौर पर visible symptoms से पहले वहीं दिखते हैं.

nano datei.txt            # editor खोलें
vim datei.txt             # Vim editor
cat datei.txt             # file दिखाएं
tail -f server.log        # log live follow करें
grep "error" server.log   # file में खोजें

nano quick changes के लिए ज्यादा accessible है, vim ज्यादा powerful है लेकिन routine मांगता है. tail -f server.log से तुम startup live देखते हो. grep "error" server.log error messages filter करता है; जरूरत पड़े तो failed, exception, denied, port या किसी mod के नाम जैसे terms भी search करो.

Server management

अगर तुम्हारा Gameserver systemd service के रूप में setup है, तो तुम उसे systemctl से control करते हो और system logs journalctl से पढ़ते हो. Official systemd documentation systemctl को systemd system और service manager को control करने का tool बताती है: freedesktop.org पर documentation

systemctl status server   # service status
systemctl restart server  # service restart करें
journalctl -u server      # logs दिखाएं
df -h                     # disk space check करें
free -h                   # RAM usage

systemctl status server दिखाता है कि service active है या नहीं और कौन सी latest log lines relevant हो सकती हैं. journalctl -u server तब ज्यादा precise है जब तुम्हें ज्यादा history चाहिए. df -h free disk space check करता है; full disks updates, saves और log files block कर सकते हैं. free -h दिखाता है कि memory कम पड़ रही है या नहीं.

SteamCMD

कई dedicated Gameserver SteamCMD से install या update किए जाते हैं. Existing command anonymous login use करता है, app ID update करता है, files validate करता है और उसके बाद SteamCMD बंद करता है.

steamcmd +login anonymous +app_update <appid> validate +quit
Game App-ID
CS2 730
Rust 258550
ARK 376030
Valheim 896660
7D2D 294420

<appid> को सही App-ID से replace करो. Update के बाद server start करना, start log check करना और test करना चाहिए कि server reachable है या नहीं. Modified servers पर validate local changes overwrite कर सकता है; इसलिए important configurations और mod files पहले backup कर लो.

Result check करना

Changes के बाद तीन steps में check करो: क्या process चल रहा है, क्या port listen कर रहा है, और क्या logs में नए errors नहीं हैं? Practical order यह है: systemctl status server या ps aux | grep server, उसके बाद ss -tulpn, फिर tail -f server.log या journalctl -u server. Game client में test तभी worthwhile है जब यह layer ठीक हो.

Troubleshooting

Server start नहीं होता

सबसे पहले start log check करो. Common causes हैं start.sh पर missing execute permissions, गलत working folder, missing files या occupied port. pwd, ls -la, chmod +x start.sh और उसके बाद log output check करो.

Port reachable नहीं है

Game port, query port और protocol compare करो. कुछ Gameserver TCP और UDP को अलग-अलग use करते हैं. ss -tulpn से check करो कि service listen कर रही है या नहीं, और ufw status से कि firewall connection allow कर रही है या नहीं.

Process hang है या respond नहीं कर रहा

Process ID को ps aux | grep server से search करो. पहले service या Gameserver console के जरिए normal stop try करो. kill -9 <PID> तभी use करो जब process clean तरीके से बंद नहीं हो सकता.

Update ने configuration बदल दी

अगर SteamCMD validation के बाद settings missing हैं, तो अपना backup restore करो या affected files compare करो. खास तौर पर mods और custom start parameters के साथ updates से पहले changes backup करना चाहिए.

जांच, सीमाएं और सुरक्षित वापसी

Guide “Linux Gameserver Befehle – wichtige Terminal Commands” article में described server type और check के समय visible version state पर लागू होती है. Menu names, available versions, mod या plugin compatibility और required resources updates के बाद अलग हो सकते हैं. इसलिए values को बिना check किए किसी दूसरे game, loader या server version पर transfer मत करो.

World, savegame, configuration या extensions में changes से पहले affected files का backup बनाओ. फिर सिर्फ एक related step बदलो और उसे उसी client और server version से check करो जिससे तुम बाद में खेलना चाहते हो.

Checkpoint Expected result Abort और rollback
Server start Server बिना नए error message के ready state तक पहुंचता है. Start errors पर change revert करो और latest backup restore करो.
Connection test एक test account panel में दिखाई गई address से connect कर सकता है. Version या connection errors पर version, port और openings फिर से match करो.
Function test जो specific function बदला गया है वह existing world या game data को damage किए बिना काम करता है. Side effects पर server stop करो और backed-up files restore करो.

Successful single test performance या availability guarantee नहीं है. World size, mods, plugins, player count, network path और simultaneous load result बदल सकते हैं. Version, change और test result document करो ताकि तुम later deviations trace कर सको.

FAQ

क्या game-serverhosting पर मुझे ये Linux commands हमेशा चाहिए?

नहीं. कई standard tasks management interfaces और supported workflows से चलते हैं. Commands खास तौर पर तब helpful हैं जब तुम technical causes खुद समझना चाहते हो या support hints के साथ targeted तरीके से काम करना चाहते हो.

netstat बेहतर है या ss?

Modern Linux systems पर ss आम तौर पर ज्यादा suitable choice है, क्योंकि यह newer tool family use करता है. अगर तुम्हारे system पर netstat available है, तो simple checks के लिए यह फिर भी काम कर सकता है.

मुझे kill -9 कब use करना चाहिए?

सिर्फ last resort के रूप में, जब process normal stops पर respond नहीं करता. Forced abort write operations interrupt कर सकता है, इसलिए उसके बाद logs और save files check करना चाहिए.

क्या मैं SteamCMD हर game के लिए anonymously use कर सकता हूं?

नहीं. दिखाया गया command सिर्फ उन server apps के लिए काम करता है जो anonymous access allow करते हैं. अगर game login या extra rights मांगता है, तो तुम्हें उस game की official documentation follow करनी होगी.

Error खोजने के लिए सबसे important command क्या है?

एक single command नहीं है. Practice में tail -f server.log, ss -tulpn और systemctl status server का combination खास तौर पर useful है, क्योंकि यह log errors, ports और service status को साथ में visible बनाता है.