C Programming Tutorial 6 - Intro to UNIX/Linux - Part 1

submitted by mkenny400 on 03/19/18 1

The goal of this video is to teach you how to do the most basic things inside of a terminal. Now, these commands are going to be the same for UNIX operating systems, like Mac, and also Linux operating systems, like Ubuntu.   This is in a C Programming series, but we are not going to be doing much C for right now. That's because in order to be successful with C programming, we ought to familiarize ourselves with Linux. In fact, one of the biggest reasons C became so popular is because it was the standard programming language when UNIX gained popularity. So even if we are not talking directly about C, this content is still extremely relevant.   Now, to start off, we should go over what UNIX and Linux are. As a reminder if you are a beginner, an operating system is just software that allows you to work with a computer and does things like manage input and output, memory, etc. Two popular operating systems include Windows 10 and Mac OS. UNIX and Linux are categories of operating systems. This means that there are multiple UNIX operating system, one of which is Mac OS, and there are multiple Linux operating systems, one of which is called Ubuntu. The difference between UNIX and Linux is not so important right now because Linux is a UNIX-like operating system.   Because they are so similar, often people will be taking about Linux but really it can apply to UNIX operating systems as well. In these videos I am using Mac OS, which comes from UNIX, but it is going to be nearly identical for Linux operating systems. This means that if I say UNIX, you can assume Linux as well. Or if I say Linux, you can assume Unix as well.   Now one of the biggest thing Linux is known for is the terminal. If we are talking about people who use windows, very few people know how to use the command prompt, but with Linux nearly everybody uses the terminal.   The first thing you should learn how to do is the basic things you do with a mouse.   Just like you can navigate folders visually, you can navigate folders in the command line as well.   To figure out what folder you are in:   pwd   This location is known as your working directory. PWD stands for print working directory. This gives you the location of where you are, but how do you see what is in this folder?   ls   By the way, a more common name for folders in Linux is directories.   You can get more information with this command:   ls -l   The l is known as a flag and it changes the output of the program.   there is also:   ls -a   This is another flag. You can actually combine them:   ls -la   Think "list long all"   The very first thing you'll notice is that there are more files that show up. The files starting with a . are known as hidden files and don't show up by default. They're usually hidden for a reason so be careful touching them. The first section of this will list permissions. Don't worry about that for now, but notice the first letter. A D means it is a directory. That is how you tell if something is a folder or a file. Some terminals will also color code.   How do you change your directory?   cd directoryname   The directoryname can be considered an argument to the cd command. Arguments are separated by spaces.   One more thing I wanted to teach y’all. When you run ls -la you see two special cases. One is a dot and the other is two dots. The single dot refers to the current directory and the double dot refers to the parent directory. If you run pwd, you can see that the parent directory comes right before the current directory. So in order to move up a directory, you can run:   cd ..   Alternatively, you can pass in what is known as an absolute path:   cd /absolute/path   In the next video we will learn be learning some more useful Linux commands. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! www.patreon.com/calebcurry Subscribe to my newsletter: eepurl.com/-8qtH Donate!: bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: CalebCurry.com Facebook: www.facebook.com/CalebTheVideoMaker Google+: plus.google.com/+CalebTheVideoMaker2 Twitter: twitter.com/calebCurry Amazing Web Hosting - www.dreamhost.com/r.cgi?1487063 (The best web hosting for a cheap price!)

Leave a comment

Be the first to comment

Collections with this video
Email
Message
×
Embed video on a website or blog
Width
px
Height
px
×
Join Huzzaz
Start collecting all your favorite videos
×
Log in
Join Huzzaz

facebook login
×
Retrieve username and password
Name
Enter your email address to retrieve your username and password
(Check your spam folder if you don't find it in your inbox)

×