Difference between revisions of "Command line"

From Minetest Wiki
Jump to navigation Jump to search
(Add new commands)
m (Made article slightly more readable)
Line 1: Line 1:
 
== Common Commands ==
 
== Common Commands ==
* <code>--address <value></code>    - Address to connect to. ('' = local game)
+
* <code>--address <value></code>    - Address to connect to. (''empty value'' → local game)
* <code>--gameid <value></code>      - Set gameid ("--gameid list" prints available ones)
+
* <code>--gameid <value></code>      - Set gameid
* <code>--map-dir <value></code>    - Same as --world (deprecated)
+
* <code>--gameid list</code>        - List available gameids
* <code>--world <value></code>      - Set world path (implies local game) ('list' lists all)
+
* <code>--map-dir <value></code>    - Same as <code>--world</code> (deprecated)
 +
* <code>--world <value></code>      - Set world path (implies local game)
 +
* <code>--world list</code>          - List all avaliable worlds
 
* <code>--worldname <value></code>  - Set world by name (implies local game)
 
* <code>--worldname <value></code>  - Set world by name (implies local game)
* <code>--migrate <value></code>    - Migrate from current backend to another (only works when using minetestserver or --server)
+
* <code>--migrate <value></code>    - Migrate from current backend to another (only works when using minetestserver or <code>--server</code>)
 
* <code>--name <value></code>        - Set player name
 
* <code>--name <value></code>        - Set player name
 
* <code>--password <value></code>    - Set password
 
* <code>--password <value></code>    - Set password
Line 16: Line 18:
  
 
== Debugging and Testing ==
 
== Debugging and Testing ==
* <code>--logfile <value></code>    - Set logfile path ('' = no logging)
+
* <code>--logfile <value></code>    - Set logfile path (''empty value'' → no logging)
 
* <code>--info</code>                - Print more information to console
 
* <code>--info</code>                - Print more information to console
 
* <code>--trace</code>              - Print enormous amounts of information to log and console
 
* <code>--trace</code>              - Print enormous amounts of information to log and console
Line 28: Line 30:
 
=== Linux ===
 
=== Linux ===
  
Open up the terminal
+
Open up the terminal.
  
Simply type
+
Simply type:
  
 
<code>
 
<code>
Line 36: Line 38:
 
</code>
 
</code>
  
Or you can make a shell (.sh) file.
+
Or you can make a shell (<code>.sh</code>) file.
  
 
=== Windows ===
 
=== Windows ===
Line 48: Line 50:
 
</code>
 
</code>
  
And save to startserver.bat in the bin folder, next to minetext.exe
+
And save to <code>startserver.bat</code> in the <code>bin</code> folder, next to <code>minetext.exe</code>
(It doesn't need to be called startserver, that was just an example)
+
(It doesn't need to be called “startserver”, that was just an example).
  
Now run it by double clicking your bat file.
+
Now run it by double clicking your batch file.
  
  
 
[[Category:Commands]]
 
[[Category:Commands]]

Revision as of 16:14, 27 May 2014

Common Commands

  • --address <value> - Address to connect to. (empty value → local game)
  • --gameid <value> - Set gameid
  • --gameid list - List available gameids
  • --map-dir <value> - Same as --world (deprecated)
  • --world <value> - Set world path (implies local game)
  • --world list - List all avaliable worlds
  • --worldname <value> - Set world by name (implies local game)
  • --migrate <value> - Migrate from current backend to another (only works when using minetestserver or --server)
  • --name <value> - Set player name
  • --password <value> - Set password
  • --port <value> - Set network port (UDP)
  • --go - Disable main menu (skips and goes straight to game)
  • --config <value> - Load configuration from specified file
  • --server - Run dedicated server
  • --videomodes - Show available video modes
  • --help - Show allowed options

Debugging and Testing

  • --logfile <value> - Set logfile path (empty value → no logging)
  • --info - Print more information to console
  • --trace - Print enormous amounts of information to log and console
  • --verbose - Print even more information to console
  • --disable-unittests - Disable unit tests
  • --enable-unittests - Enable unit tests
  • --random-input - Enable random user input, for testing
  • --speedtests - Run speed tests

Running command line arguments

Linux

Open up the terminal.

Simply type:

./minetest --server --worldname MyWorld

Or you can make a shell (.sh) file.

Windows

The easiest way to run command line arguments on windows it to make a batch file. Open a plain text editor (for example Notepad, or Notepad++).

Enter your command line arguments in the following format:

minetest.exe --server --worldname MyWorld

And save to startserver.bat in the bin folder, next to minetext.exe (It doesn't need to be called “startserver”, that was just an example).

Now run it by double clicking your batch file.