Linux Commands
Certainly! Here are some common Linux commands:
Navigating File System:
cd
: Change directoryls
: List directory contentspwd
: Print working directory
File Operations:
cp
: Copy files or directoriesmv
: Move or rename files or directoriesrm
: Remove/delete files or directoriesmkdir
: Create a new directorytouch
: Create an empty file or update the access/modification time of a file
Text Processing:
cat
: Concatenate and display the content of filesgrep
: Search for a pattern in filesnano
orvi
/vim
: Text editors
File System Information:
df
: Display disk space usagedu
: Display directory space usagelsblk
: List block devices
User and Permissions:
whoami
: Print the current usernamepasswd
: Change user passwordchmod
: Change file permissionschown
: Change file owner and group
Process Management:
ps
: Display information about running processeskill
: Terminate a processtop
: Display real-time system statistics
Networking:
ifconfig
orip addr
: Display network interface informationping
: Test network connectivitynslookup
ordig
: DNS query toolsnetstat
orss
: Display network connections
Package Management:
apt
(Debian/Ubuntu): Advanced Package Toolyum
(Red Hat/CentOS): Yellowdog Updater, Modifieddnf
(Fedora): Dandified YUM
System Information:
uname
: Print system informationlsb_release
: Display distribution-specific informationuptime
: Display how long the system has been running
Compression and Archiving:
tar
: Create, view, or extract tar archivesgzip
orgunzip
: Compress or decompress files using gzipzip
orunzip
: Package and compress files using zip format
These are just a few examples, and there are many more commands available in Linux. You can access the manual pages for any command by using man
followed by the command name to get detailed information on its usage and options
Subscribe to my newsletter
Read articles from Piyush Agrawal directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by