Here are some of the most popular and commonly used command-line commands in Unix:
- ls – Lists directory contents.
- cd – Changes the current directory.
- pwd – Prints the current working directory.
- cp – Copies files and directories.
- mv – Moves or renames files and directories.
- rm – Removes files or directories.
- touch – Creates an empty file or updates the timestamp of an existing file.
- mkdir – Creates a new directory.
- rmdir – Removes empty directories.
- chmod – Changes file permissions.
- chown – Changes file owner and group.
- cat – Concatenates and displays the content of files.
- more – Views file contents one screen at a time.
- less – Similar to
more
, but with more features. - head – Outputs the first part of files.
- tail – Outputs the last part of files.
- echo – Displays a line of text or a variable value.
- grep – Searches for patterns in files.
- find – Searches for files and directories in a directory hierarchy.
- man – Displays the manual pages for commands.
- ps – Displays information about active processes.
- kill – Sends signals to processes, typically to terminate them.
- top – Displays real-time system information, including active processes.
- df – Reports file system disk space usage.
- du – Estimates file space usage.
- tar – Archives files.
- gzip – Compresses files.
- gunzip – Decompresses files.
- ssh – Connects to a remote machine securely.
- scp – Securely copies files between hosts.
- wget – Downloads files from the web.
- curl – Transfers data from or to a server.
- awk – Pattern scanning and processing language.
- sed – Stream editor for filtering and transforming text.
- nano – Simple text editor.
- vi or vim – Advanced text editor.
These commands form the backbone of Unix command-line operations and are essential for various tasks like file management, system monitoring, process control, and networking.