> For the complete documentation index, see [llms.txt](https://kayra.gitbook.io/hackerkayra/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kayra.gitbook.io/hackerkayra/archive-backup-bin/linux-fundamentals-tryhackme/basic-commands.md).

# Basic Commands

Divide into categories later.

{% tabs %}
{% tab title="Introduction" %}
`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)
{% endtab %}
{% endtabs %}
