FactorPad
Build a Better Process

Learn Linux - Your First Steps and Linux Basics

Stay relevant. Learn the Linux command line for Data Science.
  1. A bridge - Simplify your transition to Linux from Mac and Windows.
  2. The command line - Practice 4 very common commands.
  3. Playlist - See how we will stay organized in this tutorial series.
  4. Notes in Linux - Cover learning environments plus Linux vs Windows and Mac.
  5. Next up: navigation - Learn 7 essential Linux commands for navigation.
face pic by Paul Alan Davis, CFA
Updated: February 21, 2021
Even mortals can learn the Linux command line. Keep reading to learn faster.

Outline Back Tip Next

/ factorpad.com / tech / full-stack / learn-linux-commands.html


An ad-free and cookie-free website.


Learn Linux Commands Faster

Beginner

Video Tutorial

Videos can also be accessed from our Full Stack Playlist 2 on YouTube.

Learn Linux - First steps and Linux basics | Linux Tutorial for Beginners (4:48)

Code Examples and Video Script

Welcome. Today's question: What are the first steps when learning Linux? A tutorial for beginners.

I'm Paul, and I truly believe it shouldn't be so difficult for those in Windows and Apple environments to learn Linux.

Step 1 - Overview

So I've set out to build a bridge to the Linux command line within an open-ended and open-source Playlist on Data Science.

So we'll go straight to Linux and practice with commands listed below, and note other important first steps, before we move on to tutorial #12 and Navigation.

Step 2 - Welcome to the Linux Command Line

So this is the command line, and I'll assume this is your first, or early, introduction. Using my Windows PC, I logged in to a local server that sits in my office on the coast in California.

First, whatis; it tells you what a specified command does.

paul@fullstack:~$ whatis whatis whatis (1) - display one-line manual page descriptions

So whatis whatis tells you what whatis is. And now you won't forget that one.

Next, let's get our bearings with pwd, short for print working directory, showing where we sit in the directory structure.

paul@fullstack:~$ pwd /home/paul paul@fullstack:~$ whatis pwd pwd (1) - print name of current/working directory

Next, use cd to change directories to notes and ls to list files that we created since we started.

paul@fullstack:~$ cd notes paul@fullstack:~/notes$ ls video0002.txt video0004.txt video0006.txt video0008.txt video0003.txt video0005.txt video0007.txt video0009.txt paul@fullstack:~/notes$ whatis ls nano ls (1) - list directory contents nano (1) - Nano's ANOther editor, an enhanced free Pico clone

Step 3 - How We Stay Organized in the Playlist

And nano is a text-editor where we will be taking notes (and staying organized).

paul@fullstack:~/notes$ nano

Step 4 - Notes in Linux About Learning Linux

My Advice: learn Linux in Linux

The tutorials are about Linux. So what's the best operating system for learning Linux? Linux of course.

GNU nano 2.2.6 New Buffer Which operating system runs your PC? Linux GUI - Terminal or Konsole Command line only! macOS Terminal Windows Partition USB flash drive Windows Subsystem for Linux (Ubuntu) Cloud Dedicated a computer to Linux The Transition from a GUI Directories use / not \ No spaces in filenames Case sensitive Memorize Short filenames Memorize Short filenames Lowercase Don't use ~!@#$%^&*() Extensions are not required ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell

Here if you're running a GUI, like GNOME, KDE or Cinnamon, find the command line using Terminal or Konsole.

Or, as I've done, install the command line only and free yourself from having to learn a new Graphical User Interface (GUI).

Learn Linux on a Mac - the second best option

If you have a Mac, use the pre-loaded program called Terminal, for most of the same functionality, except directories will look a bit different. Your Mac will likely get you through this Linux for Beginners Project, but not for the rest of the Data Science Tutorials Playlist, especially when we cover topics on servers.

Windows vs Linux - you have options but not for the long term

If you're on Windows, which is the least ideal option, you have several choices.

First, you could install Linux on a separate partition on your hard drive.

Second, run Linux from a USB flash drive.

Third, Microsoft, in partnership with Ubuntu, in Q4 2016, made a version native on Windows 10, which I don't suggest because 1) it is beta; 2) doesn't include all commands and 3) has a very different directory structure that will get messy later on.

You can find a Linux Terminal in the cloud, or do what I've done in the first 10 tutorials, build a system just for Linux, refurbish an old PC or get a Raspberry Pi.

The Transition from a GUI

Let's talk about your transition from say macOS or Windows.

First, here (in Linux), directories use forward slash, just like they do in a browser. And expanding on that, this HTML file ( https://factorpad.com/tech/full-stack/data-science-tutorial.html) sits in this directory (/tech/full-stack). And while I'm at it, this is the web page that outlines this Playlist, and at the bottom you will find a clickable table of contents.

And in another Playlist on Linux, you'll find one command per 3-to-4-minute video, plus quizzes, located here Linux Essentials and on YouTube.

Okay, second, drop the spaces. In Windows and Mac you can type long descriptive filenames with spaces, but not here.

Next, Linux is case-sensitive, and because you're typing and memorizing instead of pointing and clicking, you'll want short filenames, and preferably lowercase. There are standards for coding we'll discuss later but if you've noticed commands are almost always lowercase, they don't start with numbers. Also, symbols ~!@#$%^&*() should be avoided and extensions are not required.

Most commands follow a specific structure: $ command -options arguments.

Let me save this document in .txt format (with Ctrl-o, the filename video0011.txt, and y then Enter). And do an ls directory listing using the option -1 for output in one column and the argument is the directory /home/paul/notes (but isn't required here because we're currently in the directory).

paul@fullstack:~/notes$ ls -1 /home/paul/notes video0002.txt video0003.txt video0004.txt video0005.txt video0006.txt video0007.txt video0008.txt video0009.txt video0011.txt

Next, clear the screen and finally exit logs out and closes the terminal window.

paul@fullstack:~/notes$ clear paul@fullstack:~/notes$ exit

Step 5 - Next: Linux Navigation

And this is our full stack.

It offers a roadmap for making a less difficult transition to Linux and our journey in Data Science. In the next tutorial we'll cover navigation.

Have a nice day.


What's Next?

So here we kicked off our second Project: Linux for Beginners. Learn faster by combining this text with video.

Outline Back Tip Next

/ factorpad.com / tech / full-stack / learn-linux-commands.html


learn linux
linux basics
linux for beginners
linux tutorial
linux commands
linux tutorial for beginners
debian linux
linux operating system
linux vs windows
linux server
scientific linux
linux command line
linux terminal commands
linux for data science

A newly-updated free resource. Connect and refer a friend today.