Most commonly used shell commands in Unix-like operating systems
Certainly! Here are some of the most commonly used shell commands in Unix-like operating systems:
File and Directory Commands:
ls
: List directory contents.cd
: Change directory.pwd
: Print working directory.mkdir
: Create a directory.cp
: Copy files or directories.mv
: Move or rename files or directories.rm
: Remove files or directories.touch
: Create an empty file.
File Content Commands:
cat
: Concatenate and display the content of files.more
orless
: Paginate through file content.head
: Display the beginning of a file.tail
: Display the end of a file.nano
orvim
/vi
: Text editors for creating or editing files.
File System Commands:
df
: Display disk space usage.du
: Display directory space usage.mount
andumount
: Mount and unmount file systems.find
: Search for files and directories.grep
: Search for patterns within files.chmod
: Change file permissions.
Process Management:
ps
: Display information about active processes.top
: Display real-time system statistics.kill
: Terminate a process.killall
: Kill processes by name.
User and Group Management:
who
: Display who is logged in.w
: Display information about logged-in users and their activities.useradd
,userdel
,usermod
: Manage user accounts.groupadd
,groupdel
,groupmod
: Manage groups.
System Information:
uname
: Display system information.hostname
: Display or set the system's hostname.uptime
: Display system uptime.free
: Display free and used memory.
Networking:
ifconfig
orip
: Display or configure network interfaces.ping
: Check network connectivity.traceroute
ortracepath
: Trace the route to a host.netstat
: Display network statistics.
Archiving and Compression:
tar
: Create or extract tar archives.gzip
,gunzip
: Compress or decompress files using gzip.zip
,unzip
: Create or extract zip archives.
System Shutdown and Reboot:
shutdown
: Shut down the system.reboot
: Restart the system.
Shell Operations:
echo
: Display a message.history
: Display command history.alias
: Create command aliases.source
or.
: Execute commands from a file.
These commands provide a foundation for interacting with the Unix shell and performing various tasks in a Unix-like environment. Keep in mind that the availability and behavior of commands may vary slightly between different Unix distributions.