Basic Commands

Divide into categories later.

echo "Something to Echo" | Echo something to wherever you direct it, by default to the terminal.

whoami | Shows you what user you are logged into.

ls | Lists the content of the directory provided, by default the working directory.

cd | Changes directory to the directory provided (. is the current directory .. is the previous directory)

cat | Displays the content of the file provided.

pwd | Print the current working directory's path.

find -name <File/Dir to Find> | Searches for a file/directory in the working directory.

wc <File Name> | Display the number of lines, words and bytes in a file.

grep <Things to Search For> <File Name> | Searches for specific things in files.

ssh <Username>@<IP-Address> | Connects using SSH to the provided IP address.

touch <File> | Creates a new file.

mkdir <Dir> | Creates a new directory.

cp <File/Directory> <New File/Directory> | Copies a file or a directory.

mv <Old File/Directory> <New File/Directory> | Moves a file or a directory.

rm <File/Directory> | Removes a file or a directory.

file <File> | Outputs the type of the file.

man <Command> | Displays the manual page of the given command.

su <Username> | Changes the user to the username provided.

chmod <Options> <File> | Changes the permissions of a file.

chown <User>:<Group> <File> | Changes the owner of the file (User and/or Group)

Last updated