Thm Learn Linux

THM - Learn Linux Cheatsheet

I’ve been learning hacking on and off for a few years without any kind of structure, so I would pick up some stuff here and there without really understanding how it all worked. This all changed during lockdown. Now, mind you, I still consider myself a beginner but I started using a hacking platform called Try Hack Me during lockdown to get back into hacking. I decided that this time I would do it correctly and take notes for each room I go through. The first room was Learn Linux and here is below a cheatsheet with all the important information that you can find in this room. This cheatsheet is useful after you completed the room as a way to review everything you learned and ccheck if you haven’t forgotten anything. I really hope you find some use in it!

Cheatsheet

https://tryhackme.com/room/zthlinux

Basic Commands

Basic Regular Expressions

(Used with tr, sed, vi and grep and others)

Note: it’s known as either ‘regexp’, ‘regex’

Note: You need to use -E with the last three regexps

Commands for Users

Useful Commands

File Operators

The syntax for a brace expansion is either a sequence or a comma separated list of items inside curly braces ‘{}’. The starting and ending items in a sequence are separated by two periods “..”

    echoa{0..2}b

a0b a1b a2b

Basic Shell Scripting

Store command in a file with a .sh extension if we want to run bash script but if we add a shebang (#!/bin/bash)(which is the path to shell) at the top of the script and then to run we use ./<file>

Important Directories

Contact

If you have any questions or remarks don’t hesitate to reach out on discord to therokdaba#9872.

Go back to the homepage of this website.