Navigating the File System:
- `pwd` - Print Working Directory: Display the current working directory to orient yourself within the file system.
- `ls` - List: List the contents of a directory. Adding options such as `-l` provides detailed information, and `-a` shows hidden files.
- `cd` - Change Directory: Move between directories. Use `cd ..` to move up one level.
File Operations:
- `cp` - Copy: Copy files or directories. For example, `cp file.txt /path/to/destination` copies "file.txt" to the specified destination.
- `mv` - Move: Move files or directories. It can also be used to rename files. For example, `mv file.txt newfile.txt` renames the file.
- `rm` - Remove: Delete files or directories. Exercise caution with this command, as it permanently removes files.
Working with Text Files:
- `cat` - Concatenate: Display the contents of a file. Useful for viewing the entire content of small files.
- `nano` or `vim` - Text Editors: Edit text files in the terminal. Choose between the straightforward `nano` or the more advanced `vim`.
- `grep` - Global Regular Expression Print: Search for a specific pattern within a file or command output. For example, `grep "pattern" file.txt`.
System Information:
- `top` - System Monitor: View real-time system statistics, including CPU and memory usage. Press `q` to exit.
- `df` - Disk Free: Display disk space usage. Adding `-h` provides a human-readable format.
User and Permission Management:
- `whoami` - Who Am I: Display the current username.
- `sudo` - Superuser Do: Execute a command with elevated privileges. Use responsibly.
- `chmod` - Change Mode: Modify file permissions. For example, `chmod +x script.sh` grants execute permission to a script.
Networking:
- `ping` - Network Ping: Check network connectivity to a specific host.
- `ifconfig` or `ip` - Network Configuration: Display network interface information. `ip` is more modern and versatile.
Created on Aug. 4, 2024, 10:40 a.m.