Basic Understanding of Linux Commands | Ubuntu on WSL

preview_player
Показать описание
Steps:
Part I: File and Directory Management
1. Create nested directories:
mkdir -p project/src/utils
2. Navigate directories:
cd project/src/utils
3. Move back two directories:
cd ../..
4. Rename a directory:
mv src source
5. Delete a directory:
rm -r source

Part II: File Operations
1. Create multiple files:
2. Copy a file:
3. Move a file:
4. Delete a file:

Part III: Viewing and Searching File Content
1. Display the contents of a file:
2. View the first 10 lines of a file:
3. View the last 10 lines of a file:
4. Search for a string within a file:
5. View a file with pagination:

Part IV: File Permissions and Ownership
1. Check file permissions:
2. Change file permissions:
3. Make a file executable:
4. Change file ownership (requires superuser privileges):

Part V: Networking Commands
1. Display network configuration:
ifconfig
2. Ping a server:
3. Check open ports:
netstat -tuln
4. Check network statistics:
netstat -s

Part VI: Disk Usage and Process Management
1. Check disk usage:
df -h
2. Check directory size:
du -sh /path/to/directory
3. List running processes:
ps aux
4. Kill a process by PID:
kill -9 PID
5. Monitor system performance:
top

Part VII: Archiving and Compression
1. Create a tar archive:
2. Extract a tar archive:
3. Create a compressed tar archive:
4. Extract a compressed tar archive:

Part VIII: Package Management
1. Search for a package:
apt search package_name
2. Install a package:
sudo apt install package_name
3. Remove a package:
sudo apt remove package_name
4. Update package lists:
sudo apt update
5. Upgrade installed packages:
sudo apt upgrade

End.
Рекомендации по теме