Linux is the go-to operating system for anyone looking to take a deeper dive inside their computers. Not only it gives users way more control and authority over their hardware, but it also makes developing new software rather easy.
However, for anyone looking to get into Linux, first, they need to acclimatise themselves with the Linux Terminal. There are a bunch of basic commands everyone needs to know to fly their way by the terminal that’ll make life a lot easier.
Also read: What is kernel in Linux?
These commands will give you certain basic information about various system components.
- uname – a: Displays system information about your Linux installation.
- uname – r: Displays your kernel information
- hostname/hostname -I: Displays hostname and/or the local IP address.
- uptime: Displays how long the system has been running for along with the loads.
- whoami: Displays who are you logged in as.
These commands display basic information about what’s going on with your system hardware.
- cat/proc/cpuinfo: Shows information about your CPU
- cat/proc/meminfo: Displays information on installed system memory
- lsusb -tv: Displays connected USB devices
- free -h: Shows free and used memory. This also works with different flags like -m for megabytes and -g for gigabytes while -h stands for human readable.
- dmesg: Displays information in the kernel ring buffer.
File management and directory navigation
Fly through directories and manage your files using these
- ls: Shows all the files and folders inside the currently active directory
- mkdir [directory name]: Creates a directory with the specified directory name.
- cat [filename]: Shows the specified file
- cp [location/file1] [location/file2]: Copies contents of file 1 to file 2.
- rm [filename]: Deletes the specified file
Keep a tab on everything your CPU is doing behind the scenes
- ps: Shows the currently running processes
- ps -ef | grep [process name]: Shows all process information of the specified process
- kill [pid]: Kills the process of the specified process id(PID)
- bg: Shows stopped or background jobs.
- fg [job]: Brings the specified background job to the foreground.
Why isn’t the WiFi working?
- ifconfig -a: Shows all available network interfaces along with local IP address
- ping [host]: Sends an ICMP echo request to the host(‘pings’ it)
- dig -x [IP address]: Does a reverse lookup of the specified IP Address
- wget [domain.com/file]: Downloads the file found at the specified URL
- netstat -nutlp: Shows all listening TCP/UDP ports and the programs using them.
Someone who writes/edits/shoots/hosts all things tech and when he’s not, streams himself racing virtual cars. You can reach out to Yadullah at firstname.lastname@example.org, or follow him on Instagram or Twitter.