How-to edit server.properties file on Linux
Basic steps
- Connect to Linux server
- Navigate to directory where server.properties file is located
- Use a text edit to open, modify, and save server.properties file
How-to edit server.properties using vi
- The scope of this how-to is step 3 from basic steps.
- This how-to will cover changing maximum clients from 8 to 16.
Step 1 - open server.properties file with vi
$ vi server.properties
vi is a model editor that supports insert or command mode. insert mode is where typed text could become part of the file. command mode is where keystrokes are interpreted as commands that control the edit session.
Basic cursor movement in vi:
ESC
to enter command mode when in insert modei
to enter insert mode when in command modek
orup arrow
to move up one linej
ordown arrow
to move down one lineh
toleft arrow
move left one characterl
toright arrow
move right one character$
to move to end of liner
replace single character under cursor (no <Esc> needed)R
replace characters, starting with current cursor position, until <Esc> hitu
undo last change:x
save and exit file
Step 2 - move cursor to max-players=8 line
Move cursor down to line that starts with max-players= using j
or down arrow
. Your cursor should be over m in max-players.
Step 3 - move cursor over 8
Move cursor to right using l
or right arrow
until over the 8.
Step 4 - change 8 to 16
Press R
then type 16
and press ESC
.
Step 5 - save file and exit vi
Press :x
then press Enter.
Step 6 - verify file was changed
$ grep players server.properties
You should see max-players=16 as part of output.