0% found this document useful (0 votes)
5 views3 pages

Linux Commands Reference

This document is a comprehensive reference guide for Linux commands categorized into eight sections: File and Directory Commands, Disk and Partition Commands, Network Commands, System and Process Commands, Package Management, User Management, Compression and Archiving, and Scripting and Permissions. Each section lists essential commands along with brief descriptions of their functions. It serves as a quick reference for users to perform various tasks within a Linux environment.

Uploaded by

morhmany434
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Linux Commands Reference

This document is a comprehensive reference guide for Linux commands categorized into eight sections: File and Directory Commands, Disk and Partition Commands, Network Commands, System and Process Commands, Package Management, User Management, Compression and Archiving, and Scripting and Permissions. Each section lists essential commands along with brief descriptions of their functions. It serves as a quick reference for users to perform various tasks within a Linux environment.

Uploaded by

morhmany434
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Linux Commands Reference

1. File and Directory Commands


 ls: Lists directory contents
 cd: Changes the current directory
 pwd: Displays the current working directory
 mkdir: Creates a new directory
 rmdir: Removes an empty directory
 rm: Deletes files or directories
 touch: Creates an empty file
 cp: Copies files or directories
 mv: Moves or renames files
 cat: Displays the contents of a file
 find: Searches for files
 grep: Searches text using patterns
 file: Determines the type of a file
 basename: Strips directory and suffix from filenames
 dirname: Extracts directory path from filename
 stat: Displays file or file system status
 tree: Displays directory structure in tree format
 locate: Finds files by name using database
 updatedb: Updates the database used by locate

2. Disk and Partition Commands


 df: Displays disk space usage
 du: Displays directory size
 mount: Mounts a file system
 umount: Unmounts a file system
 chmod: Changes file permissions
 chown: Changes file ownership
 lsblk: Lists information about block devices
 blkid: Displays block device attributes
 fdisk: Partition table manipulator
 mkfs: Creates a file system
 tune2fs: Adjust tunable file system parameters
 e2label: Sets or gets the label of ext file systems

3. Network Commands
 ping: Tests connectivity to another host
 ifconfig: Displays network interfaces
 ip a: Shows IP addresses of interfaces
 netstat: Displays network connections
 ss: Displays socket statistics
 curl: Transfers data from or to a server
 wget: Downloads files from the web
 scp: Securely copies files between systems
 rsync: Synchronizes files between locations
 ssh: Connects to a remote server securely
 hostname: Displays or sets system hostname
 dig: DNS lookup utility
 nslookup: Queries Internet name servers
 traceroute: Displays route packets take
 telnet: Tests connectivity to a specific port
 nmap: Scans network for open ports

4. System and Process Commands


 top: Displays real-time system processes
 htop: Enhanced interactive process viewer
 ps: Displays running processes
 kill: Terminates a process by PID
 killall: Terminates processes by name
 shutdown: Shuts down the system
 reboot: Restarts the system
 uptime: Shows how long the system has been running
 whoami: Displays current logged-in user
 id: Displays user ID (UID) and group ID (GID)
 free: Displays memory usage
 vmstat: Reports virtual memory statistics
 iostat: Reports CPU and I/O statistics
 dmesg: Displays boot and system messages
 uname -a: Displays system information

5. Package Management (Debian-based)


 apt update: Updates the package index
 apt upgrade: Installs available package upgrades
 apt install: Installs a new package
 apt remove: Uninstalls a package
 apt purge: Removes package with config files
 apt autoremove: Removes unnecessary packages
 dpkg -i: Installs a .deb package
 dpkg -r: Removes a package
 dpkg -l: Lists installed packages

6. User Management
 adduser: Adds a new user
 useradd: Adds a new user (low-level)
 passwd: Changes user password
 deluser: Deletes a user
 usermod: Modifies user account
 groupadd: Adds a new group
 groups: Shows groups of a user
 id: Displays user and group IDs

7. Compression and Archiving


 tar: Archives files
 gzip: Compresses files
 gunzip: Decompresses .gz files
 zip: Creates a zip archive
 unzip: Extracts a zip archive
 xz: Compresses files using xz
 unxz: Decompresses xz files

8. Scripting and Permissions


 bash: Starts a bash shell
 sh: Starts a shell
 source: Executes commands from a file
 alias: Creates a shortcut for a command
 chmod +x: Makes a script executable
 which: Shows the path of a command

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy