Basic Linux Commands
Understanding Linux and the basic Linux commands are critical prereqs for a cyber competition. you can also enroll for our free course Linux Masterclass to learn more about linux commands. Below are basic examples of important Linux commands.
Basic Linux Commands :
● ls - list directory content
● cat - view file contents
● file - determine file type
● mkdir - make directory
● rmdir - remove directory
● cp - copy files and directories
● mv - move files and directories
● rm - remove files and directories
● touch - create a blank file
● wc - count words, lines or chars
● sort - sort the content of a file
● head - print first few lines
● tail - prints last 10 lines( default)
● pwd - print the current working directory
● whoami - display the current user
● history - list previous commands
● locate - find files and directories
● find - search file, dir or necessery data in specified location
● grep - search for data in files
● su - change user or superuser
● sudo - temporarily superuser
● chmod - modify file access rights
● chown - change file ownership
● chgrp - change group ownership
● man - help details
● zip - create and extract zip
● md5sum - check for file tamper
● free - free and used ram
● uname - basic system info including kernel name, version, and release.
● top - running and active real-time processes
File Permission :

Network Commands :
● ifconfig - interface configurator, gives the details of all networks
● ip addr - latest and updated version of ifconfig command
● traceroute - detects the delay and determines the pathway to your target
● tracepath - similar to traceroute
● ping - checks for the network connectivity between two nodes
● netstat - provides statistical figures about different interfaces
● ss - similar to netstat but more informative
● dig - it is used to find query related info
● nslookup - used to find dns related query
● route - manipulate and shows ip routing table
● host - displays the domain name for a given ip
● arp - it is used to view and add content to kernel's arp table
● iwconfig - it is used to configure the wireless interface and view the basic wifi details
● hostname - view and set the hostname of
● curl - transfer data from/to server
● wget - downloading files from the internet through cli
● ssh - log into a remote machine
● whois - used to fetch all the info related to a website
● iftop - it is used in traffic monitoring
● tcpdump - captures the traffic that is passing through the network interface and displays it
System Info :
● nbtstat -a ip - get hostname for ip
● id - current username
● w - logged on users
● who -a - user information
● last -a - last users logged on
● ps -ef - process listing (top)
● df -h - disk usage (free)
● uname -a - kernel version/cpu info
● mount - t1ounted file sjstems
● getent passwd - show list of users
● path~$path:/home/mypath - add to path variable
● kill pid - kills process with pid
● cat /etc/issue - show os info
● cat /etc/'release' - show os version info
● cat /proc/version - show kernel info
● rpm --querj -all - installed pkgs (redhat)
● rpm -ivh ) .rpm - install rpm (-e~remove)
● dpkg -get-selections - installed pkgs (ubuntu)
● dpkg -i '.deb - install deb (-r~remove)
● pkginfo - installed pkgs (solaris)
● which tscsh/csh/ksh/bash - show location of executable
● chmod 750 tcsh/csh/ksh - disable shell , force bash