Level: Easy
In a previous article, we talked about how to install the Linux operating system on your machine (See here).
Now, today we will learn some basic to advanced Linux commands and workings of the Linux operating system. Linux is an open-source UNIX-like operating system (OS).
Basic Linux Commands
ls- List/Display Directory Listings.
cd-Change Directories.
cp -Copies a file or directory
mv -move files/folders
pwd – present working directory
cat – Display the Contents of a File to the Terminal Output.
rm -remove a file/folder
mkdir -create a directory
df- view free disk information
du – view disk usage
find command
grep- Search Files and Directories for Strings or Regular Expressions.
echo command
chmod- Change Access Controls for Files and Directories.
chown -change ownership
top command
w command
ssh command
su – switch user
uptime command
ps: Displays information about running processes
Systemctl: Control system services
Ifconfig command
usermod: Modify user account properties.
ping: Test network connectivity.
kill: Terminate processes.
File Compression Commands
Tar : Tar command, along with given below flags is used to create archive files in linux.
i. c= This flag is used to create a new archive file.
ii. f= This is the file name type of the archive file.
iii. v= This is used to print the output of the tar command verbosely.
iv. r = Used to append or update the existing tar file.Zip : zip and unzip command is used to zip and extract the files.
File Transfer Commands
scp : Secure copy
rsync: copies only the difference between source and destination
Network Commands
Dig: The dig command is used to retrieve info about DNS records and troubleshoot issues related to DNS.
Nslookup: The nslookup command is another command for quering DNS, host and domain name inside a network.
Monitoring Network Connections and Open File
netstat: netstat command is used to view network connections, network performance, identify active connections and troubleshoot network issues.
Leave a heart ❤ to show me some love 😁 !
Image: Digital Ocean
An Article By: Pradip Timilsina (@sinapradip)