Linux fundamentals tryhackme Flashcards
echo
Output any text that we provide
whoami
Find out what user we’re currently logged in as!
ls
listing
cd
Change Directory
cat
concatenate
pwd
print working directory
find
search for files in a directory hierarchy
grep
Grep, short for “global regular expression print”, isa command used for searching and matching text patterns in files contained in the regular expressions.
&
This operator allows you to run commands in the background of your terminal.
&&
This operator allows you to combine multiple commands together in one line of your terminal.
>
This operator is a redirector - meaning that we can take the output from a command (such as using cat to output a file) and direct it elsewhere.
> >
This operator does the same function of the > operator but appends the output rather than replacing (meaning nothing is overwritten).
What is SSH and how does it work
Secure Shell or SSH simply is a protocol between devices in an encrypted form. Using cryptography, any input we send in a human-readable format is encrypted for travelling over a network – where it is then unencrypted once it reaches the remote machine,
SSH allows us to remotely execute commands on another device remotely.
Any data sent between the devices is encrypted when it is sent over a network such as the Internet
–help
This option is, in fact, a formatted output of what is called the man page (short for manual), which contains documentation for Linux commands and applications.
–help
This option is, in fact, a formatted output of what is called the man page (short for manual), which contains documentation for Linux commands and applications.
man
The manual pages are a great source of information for both system commands and applications available on both a Linux machine, which is accessible on the machine itself and online.
man
The manual pages are a great source of information for both system commands and applications available on both a Linux machine, which is accessible on the machine itself and online.
touch
Create file
mkdir
Create a folder
cp
Copy a file or folder
mv
Move a file or folder
rm
Remove a file or folder
file
Determine the type of a file
What is the difference between Users & Groups
The great thing about Linux is that permissions can be so granular, that whilst a user technically owns a file, if the permissions have been set, then a group of users can also have either the same or a different set of permissions to the exact same file without affecting the file owner itself.
Let’s put this into a real-world context; the system user that runs a web server must have permissions to read and write files for an effective web application. However, companies such as web hosting companies will have to want to allow their customers to upload their own files for their website without being the webserver system user – compromising the security of every other customer.