comptia-a-plus-core2/labs/OS-9-linux-client-tools-lab.md

89 lines
1.3 KiB
Markdown

# Lab OS-9: Linux Client Tools
Domain:
- 1.0 Operating Systems
Works on:
- Linux
- Windows comparison practice
## Goal
Practice Linux commands that commonly appear on Core 2.
## Linux Steps
Run:
```bash
cat /etc/os-release
whoami
pwd
ls -l
cat /etc/passwd
cat /etc/hosts
cat /etc/resolv.conf
cat /etc/fstab
ip addr
ip route
df -h
du -h
ps aux
top
```
Press `q` to quit `top`.
Practice file commands:
```bash
mkdir linux-practice
cd linux-practice
echo "Core 2 Linux practice" > notes.txt
cp notes.txt copy.txt
mv copy.txt renamed.txt
grep Linux notes.txt
chmod u+x renamed.txt
ls -l
cd ..
rm -r linux-practice
```
Record:
- Distribution:
- Current user:
- Current directory:
- DNS server:
- Default gateway:
- Root filesystem free space:
- One process name:
- Permission string before/after `chmod u+x`:
## Windows Comparison Steps
Run:
```powershell
dir
taskmgr
nslookup example.com
tracert example.com
```
Record Linux equivalents:
- `dir`:
- Task Manager process view:
- `nslookup`:
- `tracert`:
## What You Should Learn
- `/etc/passwd` lists users.
- `/etc/shadow` stores password hashes and is protected.
- `/etc/hosts` maps names to IPs locally.
- `/etc/resolv.conf` shows DNS resolver settings.
- `/etc/fstab` controls startup mounts.
- `chmod` changes permissions.
- `top` and `ps` show processes.
- `df` and `du` show storage usage.