Commands

From Socially Distant Manual
Revision as of 00:58, 18 January 2024 by Acidiclight (talk | contribs) (Created page with "Commands are programs on a computer to perform actions using the terminal. There are dozens of commands in the game. All commands in the game can be found in Category:Commands, but important ones are listed here. == Shell built-ins == These commands are built into the shell scripting language. They are not binaries located on the file system. === <code>clear</code> === '''Usage''': <code>clear</code> Clears the screen. === <code>c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Commands are programs on a computer to perform actions using the terminal. There are dozens of commands in the game. All commands in the game can be found in Category:Commands, but important ones are listed here.

Shell built-ins

These commands are built into the shell scripting language. They are not binaries located on the file system.

clear

Usage: clear

Clears the screen.

cd

Usage: cd [path]

Changes the current working directory to the specified path if it exists. If n path is specified, then the user's home directory will be used instead. Use this command to navigate through a computer's folder structure.

echo

Usage: echo <text>

This command prints the given text to the screen. This is useful inside shell scripts to prompt the user with a message or to display information.

exit

Usage: exit

Exits the current shell. If the current shell was started by the Terminal itself, then the Terminal will also close.

Common commands

These commands are available on all computers. They can be found in the /bin directory.

cat

Usage: cat <path>...

Reads the content of the given file path or file paths, and prints their contents as text to the console.

See also: cat

ls

Usage: ls [options] [path]

Lists the contents inside a given folder path. If no path is given, then the contents of the current working directory will be used instead. Options can be used to change how the list is displayed.

See also: ls

mkdir

Usage: mkdir <path>

Creates a folder at the given path if it doesn't already exist.

See also: mkdir

sleep

Usage: sleep <time>

Runs for the specified amount of time in miliseconds, then exits. This is useful in shell scripts to add a delay between running a set of commands.

See also: sleep

sudo

Usage: sudo [command]

Runs a given command as administrator. If no command is specified, then a root shell will start instead. You must have administrator privileges to run this command.

See also: sudo

Other commands

For a full list of all commands, see Category:Commands.