Linux is one of the most popular operating systems in the world, used by millions of people for everything from personal use to enterprise-level applications. If you’re new to Linux, one of the best things you can do is familiarize yourself with some basic Linux commands. In this blog, we’ll cover 50 basic Linux commands that every beginner should know.
Here are 50 basic Linux commands every beginner should know.
- ls – List files in a directory
- cd – Change the current directory
- pwd – Print the current working directory
- mkdir – Create a new directory
- rmdir – Remove a directory
- rm – Remove a file
- touch – Create an empty file
- cat – Concatenate and display files
- less – Display a file one page at a time
- head – Display the first few lines of a file
- tail – Display the last few lines of a file
- cp – Copy a file
- mv – Move or rename a file
- ln – Create a link to a file
- chmod – Change the permissions of a file or directory
- chown – Change the ownership of a file or directory
- ps – Display information about running processes
- top – Display the processes that are consuming the most resources
- kill – Terminate a process
- tar – Create or extract a compressed archive
- gzip – Compress or decompress a file
- unzip – Extract files from a zip archive
- ssh – Connect to a remote system using SSH
- scp – Copy files between systems using SSH
- ping – Test connectivity to a network host
- ifconfig – Display network interface configuration
- route – Display or modify the system’s routing table
- netstat – Display network connections and statistics
- traceroute – Trace the route packets take to a network host
- dig – Perform DNS queries
- grep – Search for a pattern in a file or output
- sed – Stream editor for modifying text
- awk – Text processing and analysis tool
- cut – Cut out selected fields of each line of a file
- diff – Compare two files or directories
- patch – Apply changes to a file
- find – Search for files or directories
- locate – Find files or directories by name
- du – Display disk usage statistics
- df – Display free disk space
- uptime – Display system uptime and load averages
- date – Display or set the system date and time
- cal – Display a calendar
- who – Display who is logged in
- users – Display a list of logged in users
- groups – Display the groups to which a user belongs
- passwd – Change a user’s password
- su – Switch to a different user account
- sudo – Run a command with superuser privileges
- exit – Exit the current shell or terminal
These 50 basic Linux commands should be enough to get you started with using the operating system. As you become more familiar with Linux, you’ll likely want to learn more advanced commands and techniques, but this list should give you a solid foundation to build upon. Good luck, and happy computing!