How-to edit server.properties file on Linux: Difference between revisions
initial page creation |
(No difference)
|
Latest revision as of 19:01, 3 May 2020
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:
ESCto enter command mode when in insert modeito enter insert mode when in command modekorup arrowto move up one linejordown arrowto move down one linehtoleft arrowmove left one characterltoright arrowmove right one character$to move to end of linerreplace single character under cursor (no <Esc> needed)Rreplace characters, starting with current cursor position, until <Esc> hituundo last change:xsave 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.