Here’s a cheat sheet for some commonly used Unix command-line commands:
Navigation
ls
: List files and directories in the current directorycd
: Change the current directorypwd
: Print the current working directory
File Management
touch
: Create a new filecat
: Display the contents of a filemore
: Display the contents of a file one page at a timeless
: Display the contents of a file, allowing for scrolling and searchinghead
: Display the first few lines of a filetail
: Display the last few lines of a filecp
: Copy a file or directorymv
: Move or rename a file or directoryrm
: Remove a file or directorymkdir
: Create a new directoryrmdir
: Remove an empty directory
Search and Filter
grep
: Search for a pattern in a file or outputfind
: Search for files or directories that match specified criteriased
: Search for and replace text within a file or outputawk
: Process and manipulate text data
System Information
uname
: Print system information, such as the operating system and kernel versionwhoami
: Print the current user’s usernameps
: List the currently running processestop
: Display real-time information about the system’s resource usagedf
: Display information about the file system disk space usagedu
: Display information about the disk space usage of files and directories
Networking
ping
: Test connectivity to a network hostnslookup
: Look up DNS information for a domain or hostnetstat
: Display information about active network connections and open portsssh
: Connect to a remote system using SSHscp
: Securely copy files between systems using SSH
These are just a few of the many command-line commands available in Unix. For more information on how to use these commands and others, you can refer to online resources and documentation.