Welcome to the Linux Command Repository! This repository is a collection of Linux commands suitable for beginners and advanced users. Whether you are new to Linux or looking to expand your command-line knowledge, this resource is here to help you.
Linux is a popular open-source operating system known for its power, flexibility, and robust command-line interface. Learning how to use Linux commands is essential for efficient system administration, development, and automation tasks.
Below is a list of commonly used Linux commands categorized by their functionality. Each command is accompanied by a brief description of its purpose.
fdisk
: Partition table manipulator.mkfs
: Create a file system.mount
: Mount a file system.umount
: Unmount a file system.df
: Display disk space usage.du
: Estimate file and directory space usage.fsck
: File system consistency check.badblocks
: Check for bad blocks on a disk.
cat
: Concatenate and display file content.grep
: Search text using patterns.sed
: Stream editor for text manipulation.awk
: Text processing tool.sort
: Sort lines in text files.uniq
: Remove duplicate lines.cut
: Remove sections from lines.tr
: Translate or delete characters.wc
: Word, line, character, and byte count.
top
orhtop
: Display system and process information.vmstat
: Virtual memory statistics.iostat
: Input/output statistics.sar
: Collect and report system activity.ps
: List running processes.watch
: Execute a program periodically.
scp
: Securely copy files between hosts.rsync
: Synchronize files and directories.ftp
: File Transfer Protocol client.sftp
: Secure FTP client.ncftp
: Improved FTP client.curl
: Transfer data with URLs.wget
: Download files from the internet.
chmod
: Change file permissions.chown
: Change file ownership.chgrp
: Change group ownership.umask
: Set default permissions.sudo
: Execute a command as another user.su
: Switch to another user.visudo
: Edit sudoers file.
hostname
: Display or set the system's hostname.date
: Display or set the system date and time.timedatectl
: Control the system's time and date.locale
: Display or set the system locale.passwd
: Change user password.shutdown
: Shutdown or restart the system.reboot
: Reboot the system.
ifconfig
orip
: Configure network interfaces.route
: Display or modify the routing table.netstat
: Display network statistics.iptables
: Configure firewall rules (legacy).ufw
: Uncomplicated Firewall (UFW) management.firewalld
: Firewall management (systemd-based).
nano
: Simple text editor.vim
orvi
: Powerful text editor.emacs
: Extensible text editor.gedit
: GNOME text editor.kate
: KDE text editor.sublime-text
: Sublime Text editor.
du
: Estimate file and directory space usage.ncdu
: NCurses Disk Usage - interactive disk usage analyzer.df
: Display disk space usage.baobab
: GNOME Disk Usage Analyzer.
tar
: Create and extract tar archives.gzip
orgunzip
: Compress and decompress files.bzip2
orbunzip2
: Compress and decompress files.zip
orunzip
: Create and extract zip archives.rar
orunrar
: Create and extract rar archives.7z
or7za
: Create and extract 7z archives.xz
orunxz
: Compress and decompress files with LZMA algorithm.ar
ortar
: Archive manipulation.
useradd
: Add a new user.userdel
: Delete a user.usermod
: Modify user settings.passwd
: Change user password.groupadd
: Add a new group.groupdel
: Delete a group.groups
: Display groups a user belongs to.id
: Display user and group information.
ping
: Send ICMP echo requests.traceroute
: Trace the route to a host.netstat
: Display network statistics.dig
: DNS lookup utility.nslookup
: Query DNS records.host
: DNS lookup tool.ifconfig
: Configure network interfaces.
tar
: Create and extract backups.rsync
: Synchronize files and directories.dd
: Copy and convert files.dump
andrestore
: Backup and restore filesystems.
apt-get
: Debian/Ubuntu package manager.apt
: Advanced package tool (Debian/Ubuntu).yum
ordnf
: CentOS/Fedora package manager.rpm
: RPM package manager (Red Hat).dpkg
: Debian package manager.zypper
: OpenSUSE package manager.snap
: Snap package manager (Ubuntu).
journalctl
: Query the systemd journal.syslog
: System log daemon.logrotate
: Log rotation utility.dmesg
: Display kernel messages.tail
: Display the end of log files.
uname
: Display system information.lsb_release
: Display Linux Standard Base information.lscpu
: Display CPU information.lsblk
: List block devices.lshw
: List hardware information.inxi
: Display system information.
echo
: Display text.if
: Conditional statements.for
: Looping constructs.while
: Looping constructs.case
: Evaluate conditional cases.grep
: Search text using patterns.sed
: Stream editor for text manipulation.awk
: Text processing tool.cut
: Remove sections from lines.tee
: Redirect output to files and pipes.xargs
: Build and execute command lines from input.
fdisk
: Partition table manipulator.gdisk
orparted
: GUID Partition Table (GPT) tools.mkfs
: Create a file system.fsck
: File system consistency check.mount
: Mount a file system.umount
: Unmount a file system.blkid
: Display block device attributes.swapon
andswapoff
: Enable and disable swap space.
find
: Search for files and directories.locate
: Quickly find files by name.which
: Display the path to an executable.whereis
: Locate binary, source, and manual page files.grep
: Search text using patterns.
Please note that this list is not exhaustive, and Linux commands have various options and arguments. It's essential to consult the command's manual page for detailed information and usage.
We welcome contributions! If you'd like to contribute to this project, please check out our Contribution Guidelines.
Please review our Code of Conduct before participating in this project.
This project is licensed under the License.
Happy Linux command-line learning!