Careers
Linux Commands for Cyber Security: Beginner Cheat Sheet
Almost every security tool runs on Linux, and most servers you will defend or test run it too. You do not need to memorize hundreds of commands. Learn these, in a virtual machine you can break safely.
Move Around and Read Files
pwdshows where you are;ls -lalists files with permissions and hidden files;cdchanges folder.cat fileprints a file;less filelets you scroll;headandtailshow the start and end.tail -f /var/log/auth.logfollows a log live.
Search
grep "Failed password" /var/log/auth.logfinds lines containing text.grep -r "password" /etc 2>/dev/nullsearches a folder tree.find / -name "*.conf" 2>/dev/nullfinds files by name.
Permissions and Users
whoamiandidshow who you are.chmod 600 fileandchown user filechange permissions and owner.sudoruns a command as administrator. A file readable by everyone, or a program with a risky setuid bit, is a typical weakness; see privilege escalation explained.
Processes and Network
ps auxlists processes;topshows them live.ip ashows addresses;ss -tulpnshows what is listening and which program owns it.curl -I http://192.168.56.20/fetches headers from a web server.
For the ideas behind these, read networking basics for cybersecurity.
Turn a Log into an Answer
Combine commands with pipes. This counts failed SSH logins per source address:
grep "Failed password" /var/log/auth.log | awk '{print $11}' | sort | uniq -c | sort -nr
The address is usually the eleventh field, but lines for invalid users differ, so check your own log. This is the same thinking a SIEM applies at scale; see what is a SIEM.
Next Steps
Install Kali or Ubuntu in a VM (Kali Linux for beginners), practice daily for two weeks and keep a cheat sheet in your own words.
Sources and Further Reading
Starting from zero? Ask a counselor which first step suits you. Contact us or call +91 86868 92922.
Courses Mentioned in This Guide
More Guides
SOC Analyst vs Penetration Tester: Which Career for a Fresher?
SOC analyst or penetration tester? Compare the daily work, skills, entry route, shifts and openings for freshers in Hyderabad, and how to choose.
Read the guide →SOC Analyst Interview Questions for Freshers, with Answers
Fifteen SOC analyst interview questions for freshers with short model answers: logs, phishing, alerts, networking, SIEM, incident response and ATT&CK.
Read the guide →What Is MITRE ATT&CK? A Beginner's Guide for SOC and Red Teams
MITRE ATT&CK explained: tactics, techniques and sub-techniques, how SOC analysts map detections to it, how red teams use it, and how to start learning it.
Read the guide →Sysmon for Beginners: Install, Config and Event IDs
Install Sysmon on a Windows lab VM, apply a config, and read the key events for process creation, network connections and DNS, with PowerShell commands.
Read the guide →Start Your Cyber Security Career
Talk to a counselor, choose the right course for your goals, and get the fee, syllabus and next batch dates in writing.
- Call+91 86868 92922
Open 7 days: Mon to Fri 8:30 AM to 8:30 PM IST
Sat and Sun 10 AM to 6 PM IST - Emailinfo@hackingtrainer.com
- VisitGround Floor, G-3, Sri Venkatasai Nest, Kallu Compound Road, Nagarjuna Nagar Colony, Yella Reddy Guda, Ameerpet, Hyderabad – 500073
Open in Google Maps