0% found this document useful (0 votes)
8 views2 pages

THM - Linux Fundamentals Part 1

Uploaded by

huwi4183
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

THM - Linux Fundamentals Part 1

Uploaded by

huwi4183
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Hsu Wai Lwin Hnin ʚɞ

THM - Linux Fundamentals Part 1


Command Description Example

echo Output any text that we provide echo “Hello”

whoami Find out what user we're currently whoami


logged in as!

ls Lists the files and directories in the ls -al


current directory.

cd change directory cd /path

cat Concatenates and displays the cat file.txt


contents of files.

pwd Prints the current working directory pwd


(full path).

find Searches for files and directories find / -name file.txt


based on conditions.
find / -name *.txt

grep Searches for specific patterns in text grep "123" hello.txt


files or command output.

wc Counts lines, words, and characters wc -l file.txt


in a file or input.
Shell Operators

Operators Description Example

& Runs a command in the background. sleep 10

# The terminal is locked for


10 seconds.

sleep 10 &

# The sleep command runs in


the background.

#free to run other


commands.

&& Runs commands sequentially; the command1 && command2


second command executes only if the
first is successful.

> Redirects output to a file, overwriting echo hey > file.txt


its content.

>> Appends output to a file without echo hello >> file.txt


overwriting.

You might also like