Command Line Jump Start
user@admirux:~$ Command Line Jumpstart
Master essential Linux commands with this comprehensive guide. If you're new to Linux or want to improve your terminal skills, check out the Simulated Terminals or the Interactive Linux Terminal to practice these commands.
user@admirux:~$ File and Directory Management
These commands are essential for navigating and organizing your filesystem:
- ls – List directory contents
- cd – Change directory
- pwd – Print working directory
- mkdir – Make a new directory
- rmdir – Remove an empty directory
- rm – Remove files or directories
- cp – Copy files or directories
- mv – Move or rename files or directories
- touch – Create an empty file
- find – Search for files and directories
- locate – Find files by name
- updatedb – Update the database used by locate
- tree – Display directory structure
- ln – Create hard and symbolic links
- stat – Display detailed information about a file
- basename – Strip directory and suffix from filenames
- dirname – Strip last component from file name
- file – Determine file type
- du -sh – Display disk usage
- df -h – Display available disk space
user@admirux:~$ File Viewing and Editing
View, edit, and manipulate files with these powerful commands:
- cat – Concatenate and display file content
- more – View file content one screen at a time
- less – View file content with backward movement
- head – Display the beginning of a file
- tail – Display the end of a file
- nano – Simple text editor
- vim – Advanced text editor
- emacs – Powerful text editor
- gedit – Graphical text editor for GNOME desktop
- sed – Stream editor for text transformations
- awk – Text processing tool
- wc – Word, line, and byte count
- cut – Remove sections from each line
- paste – Merge lines of files
- sort – Sort lines of text files
- uniq – Remove repeated lines
user@admirux:~$ File Permissions and Ownership
Managing file permissions is key to system security. Use these commands to control access:
- chmod – Change file permissions
- chown – Change file owner and group
- chgrp – Change group ownership
- umask – Set default file permissions
- ls -l – List files with permissions
- stat -c "%A %a %n" – Display file permissions
- getfacl – Get file access control list (ACL)
- setfacl – Set file access control list (ACL)
- sudo – Execute commands as another user
- su – Switch user account
- visudo – Edit sudoers file
- groups – Show user group memberships
user@admirux:~$ System Information
Monitor your system’s performance and health with these commands:
- uname – Print system information
- top – Display system tasks and resource usage
- htop – Interactive process viewer (installation required)
- df – Display disk space usage
- du – Display directory space usage
- free – Display memory usage
- uptime – Show system uptime
- who – Show logged-in users
- w – Show logged-in users and their activity
- last – Show last logins
- dmesg – Print kernel messages
- lscpu – Display CPU information
- lsblk – List block devices
- lshw – List hardware information
- hostnamectl – Query/change system hostname
- lsusb – List USB devices
- lspci – List PCI devices
user@admirux:~$ Process Management
Efficiently manage and control system processes with these commands:
- ps – Report a snapshot of processes
- top – Display system tasks and resource usage
- kill – Terminate processes
- pkill – Kill processes by name
- killall – Kill processes by name
- bg – Resume suspended jobs in background
- fg – Bring a background job to the foreground
- jobs – List active jobs
- nice – Run command with modified priority
- renice – Alter process priority
- nohup – Run a command immune to hangups
- at – Schedule commands
- crontab – Schedule periodic jobs
- systemctl – Manage system services
- service – Control system services
user@admirux:~$ Package Management
Install, update, and remove software with these commands:
- apt-get – Package manager for Debian-based systems
- yum – Package manager for Red Hat-based systems
- dnf – Successor to yum on Red Hat-based systems
- rpm – RPM package manager
- zypper – Package manager for openSUSE
- snap – Package manager for universal Linux packages
- flatpak – Package manager for Flatpak environments
- pacman – Package manager for Arch Linux
- dpkg – Package manager for Debian systems
user@admirux:~$ Network Management
Monitor and manage network connections with these commands:
- ping – Send ICMP requests to network hosts
- ip – Manipulate routing, devices, and tunnels
- netstat – Display network connections
- ss – Investigate sockets
- traceroute – Trace route to a network host
- curl – Transfer data from or to a server
- wget – Download files from the web
- hostname – Show or set the system’s hostname
- dig – DNS lookup
- nslookup – Query DNS servers
- iptables – Administer IP packet filter rules
- firewalld – Manage firewall zones (CentOS/RedHat)
user@admirux:~$ User and Group Management
Manage users and groups to control system access:
- adduser – Add a user to the system
- userdel – Delete a user from the system
- usermod – Modify a user account
- groupadd – Add a group to the system
- groupdel – Delete a group from the system
- passwd – Change user password
- chage – Change password expiry
- gpasswd – Administer /etc/group and /etc/gshadow
- id – Print user and group information
- visudo – Edit sudoers file
user@admirux:~$ Archiving and Compression
Archive and compress files for storage or transfer:
- tar – Archive files
- gzip – Compress files
- gunzip – Decompress files
- bzip2 – Compress files with bzip2
- bunzip2 – Decompress bzip2 files
- zip – Compress files
- unzip – Extract ZIP archives
- xz – Compress using XZ
- unxz – Decompress XZ files
- zcat – View contents of compressed files
user@admirux:~$ Miscellaneous Commands
Additional commands to enhance your workflow:
- echo – Display a line of text
- date – Display or set system date and time
- cal – Display a calendar
- bc – Arbitrary precision calculator
- history – Show command history
- alias – Create a shortcut for a command
- unalias – Remove an alias
- man – Display the manual for a command
- grep – Search text using patterns
- sed – Stream editor for filtering and transforming text
- awk – Pattern scanning and processing
- sort – Sort lines of a text file
- cut – Remove sections from lines
- diff – Compare files line by line
- xargs – Build and execute command lines
- tee – Write to stdout and files
user@admirux:~$ █
user@admirux:~$ Additional Resources
Here are some essential resources that will help you dive deeper into Linux and the command line:
- Admirux Simulated Terminals – Practice Linux commands in a simulated environment.
- Admirux Interactive Linux Terminal – Hands-on experience with the Linux terminal in your browser.
- Linux Man Pages – Comprehensive manual pages for all Linux commands.
- LinuxCommand.org – A beginner-friendly guide to the Linux command line.
- GNU Bash Manual – Complete documentation on the Bash shell.
- The Linux Documentation Project – Extensive Linux guides and tutorials.
- Cyberciti.biz Linux Tips – Practical Linux tips and guides for all skill levels.
- Reddit Linux Community – A large, active Linux community to discuss problems and solutions.
- Ask Ubuntu – A community-driven Q&A for Ubuntu and Linux users.
- StackOverflow Linux Tag – Troubleshoot Linux issues with the help of the developer community.
- The Linux Kernel Documentation – Official Linux kernel documentation.
- Linux on GitHub – Browse and contribute to the Linux kernel source code.
For more advanced learning, these resources offer deep insights into Linux, scripting, and system management. Happy learning!