Operating System Commands
Sub- lesson four
Operating systems provide commands to manage files, processes, networks, and system
configurations. These commands are used in Command Line Interfaces (CLI) like Command
Prompt (Windows), Terminal (Linux/macOS), and PowerShell. Below are some essential
commands categorized by function:
1. File and Directory Management
Command Description OS
dir Lists files and directories in a folder Windows
ls Lists files and directories Linux/macOS
mkdir folder_name Creates a new directory Windows/Linux/macOS
rmdir folder_name Deletes an empty directory Windows/Linux/macOS
rm -r folder_name Deletes a directory and its contents Linux/macOS
del file_name Deletes a file Windows
rm file_name Deletes a file Linux/macOS
copy file1 file2 Copies a file Windows
cp file1 file2 Copies a file Linux/macOS
move file1 folder_name Moves a file Windows
mv file1 folder_name Moves a file Linux/macOS
2. System Information & Management
Command Description OS
systeminfo Displays system information Windows
uname -a Shows system details Linux/macOS
tasklist Lists running processes Windows
ps Lists running processes Linux/macOS
taskkill /IM process_name Kills a process Windows
kill process_ID Kills a process Linux/macOS
shutdown /s Shuts down the computer Windows
shutdown -h now Shuts down the system Linux/macOS
restart Restarts the system Windows/Linux/macOS
3. Networking Commands
Command Description OS
ipconfig Displays IP configuration Windows
ifconfig Shows network interface details Linux/macOS
ping [Link] Checks network connectivity Windows/Linux/macOS
tracert [Link] Traces the route to a host Windows
traceroute [Link] Traces the route to a host Linux/macOS
netstat -an Displays active connections Windows/Linux/macOS
4. Disk Management
Command Description OS
chkdsk Checks disk for errors Windows
df -h Displays disk space usage Linux/macOS
diskpart Manages disk partitions Windows
du -sh folder_name Shows folder size Linux/macOS
5. User Management & Permissions
Command Description OS
whoami Shows the current user Windows/Linux/macOS
net user Lists all users Windows
adduser username Creates a new user Linux/macOS
passwd username Changes a user's password Linux/macOS
chmod 755 file Changes file permissions Linux/macOS
chown user:group file Changes file owner Linux/macOS