Animated Linux command line terminal window symbolizing this Linux tutorial

Linux Tutorial for Beginners – Learn w/ Quizzes & Exercises

Welcome to Linux for beginners!

Linux isn’t just another operating system. It’s a game-changer! With Linux you’ll be able to complete tasks that are simply impossible on other platforms. It’ll help you get that salary boost, advance your career and impress your coworkers!

  • So here’s the game plan:
    We’ll kick off with the basics, such as how the command line works and how to use it without pulling your hair out. Once you’ve got that down, we’ll dive deep. Everything from securing applications with the help of permissions to automating those boring, repetitive tasks by creating scripts.

  • But what’s knowledge without practice?
    That’s why our Linux tutorial is designed for hands-on learning. At the end of each lesson you’ll find interactive quizzes that will put your knowledge to the test and help make complex concepts stick.

  • And here’s the cherry on top:
    We believe that learning should be fun! So, expect some humor and engaging elements sprinkled throughout this Linux tutorial to make your learning journey a breeze!

Are you ready to roll up your sleeves and dive right in? Remember, every expert was once a beginner. Embrace your curiosity, dive into the lessons, and transform your understanding of Linux. Your journey starts now!

Preparation: Installing Linux:

Before we get our hands dirty with the command line, let’s make sure you’re all set up. We highly recommend opening a Linux command line on your device and replicating every command we demonstrate throughout this Linux tutorial.

This hands-on approach will provide you with a more intuitive understanding of the command line and help you retain the information better. As the saying goes, practice makes perfect!

If you’re feeling a bit lost on how to access a Ubuntu terminal, don’t worry! Simply select one of the buttons below to receive instructions according to your operating system:

The Linux "Welcome Message":

Our first encounter on the linux command line is with the welcome message. It warmly greets us, showcasing essential information. Here’s what it looks like:

				
					Welcome to Ubuntu 22.04 LTS (Jammy Jellyfish)

* Documentation: https://help.ubuntu.com
* Management:    https://landscape.canonical.com
* Support:       https://ubuntu.com/advantage

* Ubuntu Pro delivers the most comprehensive open source security and compliance features.

This message is shown once a day. To disable it please create the /home/ubuntu/.hushlogin file.
username@hostname:~$
				
			
  • Version Info:
    The opening lines give us a peek into the version and other relevant details – we’ll ease into those in later lessons.

  • Resources & Tips:
    Next up, we have a few links to various resources (in this case, ubuntu’s documentation, ubuntu.com account management and paid support), followed by highlights of different applications or services related to our operating system.

  • Deactivation Instructions:
    As we reach the end of the welcome message, we encounter instructions on how to disable it. While these instructions might seem cryptic now, rest assured that you’ll be able to understand them in due time (so make sure you stick around until the end of this awesome Linux tutorial!)

Understanding the Command Prompt:

Just beneath the welcome message, we can see what we call the command prompt, it looks something like this: username@hostname:~$.

  • Username:
    First up, we see the username of the account currently logged into the system.

  • Hostname:
    Next, the @ sign introduces our computer’s unique identifier, also known as the hostname.

  • Current Directory:
    Next up, a colon steps in as another separator, leading us to the tilde ~ punctuation mark, or as some call it, the squiggly line! Don’t worry about this for now, we’ll learn all about it in an upcoming lesson. (Note that you can select any lesson in this Linux tutorial by using the side bar on the right).

  • Ready for Commands:
    Finally, the dollar sign $ indicates that the prompt is ready to accept a command.

What exactly is a Command, you ask?

Simply put, commands are specific words that we can type into our linux terminal to instruct it to carry out certain actions. Think of linux commands like miniature applications that execute specific tasks. Let’s see what they look like in action!

The first command we’ll use is called ping. This handy utility helps us troubleshoot network and internet connectivity issues. Let’s put it to work!

All we have to do is type “ping” with a lowercase “p”, followed by a URL, such as “google.com”. Here’s what that would look like: ping google.com

With a tap of the Enter key, we set our command in motion.

				
					ubuntu@ip-172-31-45-72:~$ ping google.com
PING google.com (172.217.0.174) 56(84) bytes of data.
64 bytes from mia09s16-in-f14.1e100.net (172.217.0.174): icmp_seq=1 ttl=100 time=17.6 ms
64 bytes from yyz08s10-in-f174.1e100.net (172.217.0.174): icmp_seq=2 ttl=100 time=17.8 ms
64 bytes from yyz08s10-in-f174.1e100.net (172.217.0.174): icmp_seq=3 ttl=100 time=17.7 ms
64 bytes from yyz08s10-in-f174.1e100.net (172.217.0.174): icmp_seq=4 ttl=100 time=17.8 ms
64 bytes from ord38s42-in-f14.1e100.net (172.217.0.174): icmp_seq=5 ttl=100 time=17.6 ms
64 bytes from yyz08s10-in-f174.1e100.net (172.217.0.174): icmp_seq=6 ttl=100 time=17.7 ms
^C
--- google.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5006ms
rtt min/avg/max/mdev = 17.628/17.692/17.804/0.065 ms

				
			

As you can see ping constantly attempts to communicate with our destination in order to determine whether it’s reachable or not. A response indicates that we can reach the destination and therefore we have a working internet connection. It’s similar to how you know you’re connected to the internet when you successfully open a webpage.

As ping works its magic, it reveals various information, such as the duration of each interaction. To stop ping from communicating with the destination, press the “control” and “c” keys on your keyboard. The “C” stands for “cancel” and is used to signal to our command line to abort the currently running operation.

Once the operation stops, ping provides a few more statistics about the interactions that took place. Quite the spectacle, wouldn’t you agree?

If you’re not familiar with all this networking terminology, don’t worry! The purpose of this lesson is to teach you about commands. We used ping as an example in this linux tutorial because it not only it looks fancy, and you can brag about it to your friends, but also because you may find it genuinely useful in the future.

Don't forget about Command case-sensitivity!

It’s important to note that commands in the Linux command line are case-sensitive. This means that typing Ping with an uppercase “P” wouldn’t be recognized by our terminal. Just for fun, let’s give it a try:

				
					ubuntu@ip-172-31-45-72:~$ Ping google.com
Command 'Ping' not found, did you mean:
  command 'king' from deb king (2.24+dfsg2-1)
  command 'bing' from deb bing (1.3.5-4)
  command 'jing' from deb jing (20181222+dfsg2-6)
  command 'wing' from deb wing (0.7-32)
  command 'ding' from deb ding (1.9-3)
  command 'ping' from deb iputils-ping (3:20211215-1)
  command 'ping' from deb inetutils-ping (2:2.2-2ubuntu0.1)
Try: sudo apt install <deb name>

				
			

As expected, it doesn’t work. Helpfully, our command line displays other commands that it thinks are related to what we’re looking for, including ping with a lowercase “p”. So keep this in mind throughout this Linux tutorial: commands are case sensitive!

Final Thoughts:

How awesome is that? You’ve not only learned what commands are but also how to troubleshoot internet connectivity issues like a pro! Congratulations on taking this first step in your Linux journey!

But don’t stop now! Complete the quiz below and then head off to the next lesson! There’s a lot more in store for you in this Linux tutorial!

Fun Facts to brighten your day:

  • Why did the computer show up at work late? It had a hard drive!

  • Why was the computer cold? It left its Windows open. But don’t worry, in the Linux world, we’re always snug and secure!

  • The first word ever spoken on the Internet was ‘lo’. It was supposed to be ‘login’, but the system crashed after two letters. Linux, however, is known for its stability. It would have got the whole word out!

Test Your Knowledge (Practice Quiz):

There has been error loading this quiz, please refresh the page or enable JavaScript to continue.

0/5

Take your Knowledge to the next level!

Learn the Linux command line with our interactive course!

Animated Rocket symbolizing how awesome our Linux command line course is.

Welcome back!

Don't have an account? Select the register button to create one!

First time around?

You're in the right place! Fill out the form to create your account: