Imagine you have to delete files that are over 2 years old from a large dump of files. What would you do? Double click on every folder → sort the files by time → and carefully select the required files to be deleted?
What if there are subfolders inside which there are over 1000 more files to be sorted? The task is becoming a nightmare, isn’t it?
What is Linux command?
Linux is an operating system (OS) that is present between applications and the hardware of our systems.
The Command Line Interface (CLI) or the Linux terminal is where you get to type your commands and interact with the server. It is a text interface that performs operations the OS allows it to.
It is a powerful tool to ease your work that may look complex for GUI (Graphical User Interface) to support. Usually, operations performed via the CLI are faster than their GUI counterpart. In fact, you can run different tasks simultaneously in multiple command lines. And CLI requires very less RAM compared to GUI.
For these reasons, Linux commands are widely used to automate tasks when working on a large number of files or data.
- Bulk rename numerous files at one go.
- Replace a certain text from a large number of files.
Despite these advantages, it can be intimidating to use a Command Line Interface if you haven’t used one before.
If you are wondering what to do to get comfortable with it, the next section is for you.
How to start using Linux basic commands
Linux has a lengthy list of commands that make a developer’s life easy. But for beginners, this can be overwhelming.
By focusing on some basic commands at the start, it will be easy for you to get hands-on with a Command Line Interface of a Linux server in no time.
Find out what these commands do:
For starters, you can get familiar with Linux commands to do the following tasks with files and directories in your system:
- Search/Replace/Find count
- Check file permissions
To level-up the fun and challenge, you can explore how to customize command behavior using flags.
Start learning Linux commands basics with Crio
Crio’s Linux Bytes are made for all beginners who want to get a hang of moving away from GUI and start using Linux commands for commonly performed tasks, understand in-depth about process resource usage, networking, and more.
What you will Learn by Doing in Linux Basics 1
- Purpose of using a Command Line Interface
- Ways to perform common tasks using the CLI compared to the usual GUI.
- How to navigate through a Linux file system.
- Use of redirection operators and piping to control output of commands.
- Data analysis of Hadoop log files to find out interesting insights.
Most importantly you will get rid of the fear of Linux terminal!
What you will Learn by Doing in Linux Basics 2
- Understand the concept of processes and how to check their resource usage.
- Find out if your system supports GTA 5.
- Create a simple CLI-based chat application to understand networking terms like IP addresses and commands like ifconfig/ping/netstat.
- Use a bash script to programmatically remove comments from Python files.
- Understand environment variables and system PATH.
- Interesting quizzes to test your learning with involving use-cases.
As you immerse yourself in these tasks, you will appreciate the benefits of using Linux commands in real world applications.
By the end of these bytes, you will walk away with:
- Practical knowledge of applying a list of commonly used Linux commands.
- Thorough understanding of processes and Linux commands to monitor processes.
- Basic skills to retrieve system information using Linux commands.
- Fundamental knowledge using Linux network commands.
- Knowledge to use bash scripts and automate tasks or perform complex operations.
- A clear answer to the question -- How does the Linux terminal know what to do when a particular command is executed?
Real world applications of your skills
Linux is the underlying OS in a majority of the systems in today’s world. Learning to use the Command Line Interface on a Linux system is a key skill in every developer’s toolkit.
Being an open source system, Linux gives you the privilege of co-working with developers and sharing your learnings with each other.
The applications of Linux in the real world are plenty and here are some basic ones you will be able to perform after completing both the Linux Bytes:
- Perform tedious tasks like bulk renaming of files or replace text programmatically.
- Do quick analysis on log files.
- Work on cloud-based servers as they usually don’t come with a GUI.
- Automate tasks like checking if a system has enough resources(CPU/RAM/Storage) to run a process.
- Troubleshoot network connectivity problems.
Did you find this useful? Subscribe for more guides and tips on developer essentials in your inbox.