If you are just getting started in Linux then these commands should be useful.
File System:
ls : listing
cd : change directory
cat : concatenate
pwd : print working directory
find : find stuff https://tryhackme.com/room/thefindcommand
grep : find a value within a file. i.e. IP address
man : manual
help : help. More info than manual
touch : create file
mkdir : create directory/folder
cp : copy (needs destination too)
scp : secure copy
mv : move
rm : remove (need -R to remove directory)
file : determine the type of file
echo : output
nano : text editor
vim : advanced text editor
wget : download from internet
strings: look for strings in a file
chmod: change mode/permissions
Operators:
& : allows you to run commands in the background of your terminal
&& : allows you to run multiple commands together in one line of your terminal
> : direct output elsewhere
>> : as above but appends so no overwriting
Switches
su : switch user
l : login
Common Directories
etc : stores system files for OS
var : variable data
root : home directory for ‘root’ user
tmp : temporary. wiped when session ended.
Processes
ps : list processes
ps aux : list all processes
top : show all processes in live table
kill : stop process
systemctl : interact with systemd
ctrl z : background process
fg : foreground process
Automation
cron : process to execute crontabs. Time based. https://crontab-generator.org/
Leave a Reply