CraftOS is the default shell included with ComputerCraft. It offers a command-line interface to the computer. CraftOS is started by default whenever a computer is (re)started. As of ComputerCraft 1.6, CraftOS will be launched within Multishell; however, this functionality can be disabled via the Settings API.
When CraftOS is started, if a
/startup[.lua] file exists, it will run that file automatically. A full breakdown of the startup sequence can be found here
Alternative "Operating Systems" can be run on top on CraftOS (or instead of it if a Resource Pack is used), which can provide extra functionality or a better user experience if done correctly.
Programs can interact with the CraftOS shell by using the Shell API.
Usage of the shell is designed to be easy and intuitive, but as a small kickstart, a few commands you can run are listed here. Additionally try running
help in the shell for more information.
For first start of a computer, it is considered good practice to set a Label, as without one, if the computer is mined or otherwise destroyed, replacing the computer will wipe all of its data (and for Turtles, they will also lose any fuel stored in them).
To set a label on a computer, run the following:
label set myNewLabel
To traverse the directory structure of a computer, use the
To make a new directory, use the
mkdir will not automatically change the working directory to the new directory, one must do this manually with
To edit a program or file, use the