Linux commands

explainshell.com - match command-line arguments to their help text

mkdir <dir name>

rmdir <dir name>

ls -la : list all (actually long all)

man: manual

echo <string> > <filename>: print text to terminal or file

cat <filename>: display file content

cp <filname> <destination>: copy file to destination

mv <filename> <destination>: move file to destination

locate <filename>: locate file with this filename

sudo updatedb: update filename

rm <filename>: delete file

passwd: change password

User and privilege

By typing ls -la we get a bunch of information about the files. A row starting by d means that the file is a folder. A l is use for link. then rwx mean that the owner can read, write and execute file. the first three is for owner, the second for root user, the last for global. The folder /tmp is often use for malicious attack since we can rwx in.

To change permission we use the chmod command. To add a permission we use chmod +rwx which for instance allows everything to the owner. Which can be replace with chmod number as follow chmod 777 to allow everything to everyone

Untitled

sudo adduser <username>: create a new user

cat /etc/password: see user at the end of the file, you may also look at the services installed on the machine (allow to newly created users)