1. alias – Create Shortcuts for Commands π
The alias command allows you to create shortcuts for longer commands, making them easier to type and remember.
Here, ll is now an alias for ls -la. You can create any alias you like to save time.
2. at – Schedule a Command for Later ⏰
The at command lets you schedule a command to run at a specified time.
Enter the command you want to run at 5:00 PM, press Ctrl+D to schedule it.
3. cal – Display a Calendar π
The cal command displays a calendar for the current month. You can specify a year to view its entire calendar.
4. cat – Concatenate and Display Files π
The cat command is used to display the contents of a file, combine multiple files, or create new files.
5. cd – Change Directory π
The cd command is used to navigate between directories.
Use cd .. to move up one directory.
6. chmod – Change File Permissions π
The chmod command changes the permissions of files or directories.
Here, 755 sets the permissions (rwx for owner, rx for group and others).
7. chown – Change File Ownership π€
The chown command changes the owner and/or group of a file.
8. cksum – Display File Checksum and Size π’
The cksum command calculates and displays the checksum and size of a file.
9. clear – Clear the Terminal Screen π§Ό
The clear command simply clears the terminal screen.
10. cmp – Compare Two Files π
The cmp command compares two files byte by byte and shows the first difference.
11. cp – Copy Files or Directories π
The cp command copies files or directories from one location to another.
Use cp -r to copy directories recursively.
12. date – Display or Set the System Date and Time ⏳
The date command shows the current date and time.
You can also set the date (requires superuser privileges).
13. df – Display Disk Space Usage π½
The df command displays disk space usage for file systems.
The -h flag shows output in a human-readable format.
14. diff – Compare Files Line by Line π
The diff command compares two files line by line and outputs the differences.
15. du – Display Directory Size π
The du command displays the size of files and directories.
The -s flag gives a summary, and -h makes the output human-readable.
16. env – Display Environment Variables π
The env command displays all the environment variables of the current shell session.
17. find – Search for Files and Directories π
The find command searches for files and directories based on various criteria.
18. hexdump – Display File Contents in Hexadecimal Format π’
The hexdump command shows the hexadecimal representation of a file's contents.
19. history – View Command History π
The history command shows the history of commands you’ve entered in the terminal.
20. kill – Terminate a Process π
The kill command sends a signal to terminate a process. You'll need the process ID (PID).
You can find the PID using the ps command.
21. ls – List Directory Contents π
The ls command lists the files and directories in the current directory.
The -l flag shows detailed information, and -a includes hidden files.
22. man – Display Manual Pages π
The man command shows the manual for any Unix command.
23. mkdir – Create a New Directory π
The mkdir command creates a new directory.
24. mv – Move or Rename Files/Directories π
The mv command moves or renames files or directories.
25. od – Output File Contents in Different Formats π️
The od command outputs the contents of a file in octal, hexadecimal, or ASCII format.
26. ps – Display Running Processes π
The ps command shows a list of running processes.
Use ps aux to see detailed information about all processes.
27. Process Flags π΄
Process flags are used with commands like ps to filter and display specific information about processes:
-e: Show all processes.-f: Show full format.-u: Display user-owned processes.-x: Include processes without controlling terminals.
28. pwd – Print Working Directory π
The pwd command prints the current directory you're in.
29. rm – Remove Files or Directories π️
The rm command removes files or directories.
Use rm -r to remove directories recursively.
30. rmdir – Remove an Empty Directory π️
The rmdir command removes an empty directory.
31. sort – Sort Lines of Text π
The sort command sorts the lines in a file.
32. tee – Read from Standard Input and Write to a File π
The tee command reads input from stdin and writes it to both a file and the terminal.
Conclusion π
These Unix terminal commands are just the tip of the iceberg, but they offer a solid foundation for navigating, managing, and manipulating files and processes in a Unix-like operating system. By mastering these commands, you’ll be able to work more efficiently and confidently in any Unix environment!
Let me know if you have any questions or want to learn more advanced commands! π

Comments
Post a Comment