Hey there, Linux newbies! Ready to unlock the power of the Linux command line? In this fun and approachable guide, we dive into the Ubuntu terminal to teach you the essentials of command-line magic. Perfect for beginners, this video covers everything from launching a terminal (like the awesome Terminator emulator) to mastering commands like ls, cd, mkdir, and rm. You’ll learn how to navigate the file system, create and delete files, edit code with Nano (sorry, Vim fans!), and even compile C++ programs with GCC. Plus, we’ll show you how to install cool programs like GIMP using apt and wield sudo like a pro. Whether you’re switching from a GUI or just curious about the terminal’s hacker vibes, this video is your gateway to a whole new world of open-source tools. Stick around till the end for a quick peek at graphical editing and a heartfelt call to join our community! Hit that subscribe button, scan the QR code to check out more tutorials, and let’s keep exploring Linux together. Drop a comment with your favorite command or what you want to learn next! #Linux #CommandLine #Ubuntu
Introduction to Linux Command Line 00:00:00
Ubuntu Linux Terminal 00:00:04
Benefits of Terminal Usage 00:00:09
Desktop Environments (XFCE vs. GNOME) 00:01:07
Launching the Terminal 00:01:55
Terminal Emulator (Terminator) 00:02:06
Understanding the Shell (Bash) 00:04:00
Echo Command and Variables 00:04:06
Clear Command 00:07:34
Navigating File System (PWD) 00:08:21
Listing Directory Contents (LS) 00:08:56
Using Man Pages 00:10:37
Changing Directories (CD) 00:13:15
Creating Directories (MKDIR) 00:14:51
Going Up Directory Levels 00:15:57
Creating and Deleting Files (Touch, RM) 00:19:03
Editing Files with Nano 00:21:00
Editing Files with Vim 00:26:24
Installing Programs with APT 00:28:06
Using Sudo for Root Access 00:32:29
Updating and Upgrading System 00:34:54
Graphical File Editing 00:36:05
Compiling C++ Programs (GCC, G++) 00:39:53
Executing Programs 00:40:57
Conclusion and Subscription Call 00:43:04
Thanks for watching!
Find us on other social media here:
- https://www.NeuralLantern.com/social
Please help support us!
- Subscribing + Sharing on Social Media
- Leaving a comment or suggestion
- Subscribing to our Blog
- Watching the main “pinned” video of this channel for offers and extras
Hello there. Today I’d like to show you a little bit about the Linux command line
inside of a terminal. More specifically I’m going to be doing this on Ubuntu Linux.
This is great for beginners to start to get to know how to issue commands and do
things like that and if you’re used to doing everything in a GUI in a graphical
user interface then you probably have no idea how much fun it is to actually
work inside of a terminal. There are tons and tons of programs that you can gain
can gain access to once you start getting more comfortable with the terminal.
When you look around at the open source world and all the wonderful tools that people make,
you’ll find out pretty quickly that a lot of programmers just write tools that only
work with the command line.
And you know, maybe later if someone else comes along and wants to add a graphical
interface for it, then they do.
But lots of times that doesn’t actually ever happen.
And so you sort of open up a whole new world for yourself when you learn to use the terminal.
when you learn to use the terminal.
Anyway, and then you also look really cool like a hacker.
So I’m on a desktop engine called XFCE
or a desktop environment called XFCE.
Most new Linux users who are on Ubuntu
are probably looking at the GNOME desktop.
So let me just say real fast,
if you have a desktop that looks nothing like this
and you think you’re on GNOME because you just installed vanilla Ubuntu or something,
then you probably want to take a look at the top left corner of the screen
for a little button called Activities,
or at the bottom left of the screen for a button that I think is like nine dots.
Both of those buttons will allow you to search for programs on the system.
What you should do is basically click one of those buttons
and then start typing in the word Terminal
until you see a terminal pop up and then you can click on it
and then you can launch it.
and then you can, you can launch it. Okay. So for me though,
I already have this set up on my desktop.
So I’m going to click on my little terminal icon and I’m going to launch a
terminal. For those of you who don’t know what terminal I’m using right now,
this is called terminator. I think it’s really cool.
I’m personally a huge fan of this terminal. Uh,
the main reason is that it’s really easy and fast to split the panes.
So you can do multiple, uh, sessions.
If you’re connected to multiple remote machines at the same time, um,
machines at the same time, you know, later in your career. It’s really convenient. It’s actually
kind of broken right now a little bit, but not too bad. I still love it. Okay, so I open up a
terminal. Technically, this is called a terminal emulator. The real terminal would just be like a
completely black screen, and you wouldn’t be able to see anything else graphical. So this is sort of
like a windowed program that runs another program under the hood that helps this program talk with
talk with the operating system and it sort of performs two-way communication and shows you
what the operating system is saying to you and doing and things like that. So,
but for all intent and purpose, this is a, this is a terminal. I always call this a terminal.
Okay. Let’s see. Maybe I need to increase the font size real fast. Um,
I got a profiles out if I do mono space and I just do it like a little bit, a little bit bigger
bigger than the default so it’s easier to watch on a video. Okay how about that is that better?
I think that’s probably better. Okay so for starters uh you’re looking at a command line
interface you’re looking at a terminal this is a terminal emulator program uh we have like a
blinking cursor you can enter commands and stuff like that it’s important to understand at first
that um you’re actually already inside of a program remember I said that the terminal emulator is a
and it helps go between you and the operating system.
There’s also another program that sort of interprets the things that you’re saying
before sending that off to the operating system.
The program is different depending on what environment you’re using,
but in Ubuntu, it usually defaults to bash.
So I’m going to type a quick command.
We’ll explain what these commands do in a second.
And I’m going to type echo shell,
and that’s going to tell me what interpreter we’re using.
So by default, we’re using an interpreter called bash.
So if you hear anybody say, hey, I’m in bash or I got a bash script.
Well, this is what it is.
It’s a program that will be understood by bash.
Okay, so what did I just type?
I typed echo and then I typed a dollar sign and then I typed shell.
So on the terminal, you know, you can type any command you want.
It may not actually work, but you know, you can type.
The way that your command is usually interpreted is if you type just one thing,
then that’s considered the program that you want to execute.
the program that you want to execute so if i type the word echo by itself and hit enter
then bash or i’ll just say you know the shell or the terminal is going to look for a program named
echo and if it finds it it’ll execute it um there’s a there’s a special way that it searches
for programs like uh the the program echo for example it has to it has to go somewhere in the
operating system right there has to be a path so if you type which echo you can see exactly where
system so slash user slash bin slash echo so that’s where it is but i can just type echo by
itself because the system knows how to go search through special system paths looking for the echo
program that you typed so it can find the real location anyway so i type echo and this program
launches and it doesn’t really do anything the thing about the echo program is if you just type
actually receive what you typed after after the echo program executable name
and it’ll just print it back to you.
So what’s happening here is the bash interpreter, the shell,
it’ll always take the first argument.
We call these arguments, words or symbols separated by spaces.
The first argument is echo.
That’s considered the program that you want to run.
And every argument after that is actually just sent into the program that you launch.
thing that’s actually launching here is the echo program and then hello is a string that gets sent
into the echo program you can do as many arguments as you want actually i don’t know if there’s like
a huge limit huge limit you can probably type a lot of these before you run out and so i’ve typed
three arguments technically the echo program is is argument zero the first argument but um i’ve
typed out three arguments that will get sent into the echo program and you can see that echo received
three of them and just printed them out and that’s it so it’s the echo program is pretty simple but
if i if i type a dollar sign and i like actually let me just type shell by itself if i say echo
shell it just prints the word shell because that’s interpreted as just like a regular string but if i
put a dollar sign in front of it then bash considers that to be a variable and so what it’ll do is it’ll
go into memory wherever the variables are stored and it’ll try to find a variable named shell
variable named shell and if there is one it’ll take the value that’s inside of shell which in
this case is just you know bash and it’ll convert the symbol dollar sign shell into
the actual variable value and then it’ll print that it’ll send that into the echo command
so if i say echo shell step one it looks for variable name shell step two it grabs bin bash
and replaces that where the dollar sign shell was written and then it sends that into the echo program
into the echo program.
So now you know how to launch a program.
Here’s another program.
It’s called clear.
If you just type the, you know, the command clear, then a program called clear gets launched.
And all it does is just to help you clear the terminal.
If you want to keep things a little clean, just to prove to you that this is a program,
we can type which clear and notice how it actually has a path in your operating system.
User bin clear.
This will be different if you’re on a different operating system than mine, but it’s all okay.
It’s all okay.
All right.
So where am I?
Because you can see that I’m at some sort of a location.
It says Mike at lectures.
That sounds like the name of my computer and the name of my profile.
But where am I in the file system?
Because your computer is like, you know, a big file system.
There’s lots of files and folders all over the place.
Where is the terminal sitting?
Is it sitting anywhere in the file system?
It actually is.
It’s sitting in your home directory by default, unless you’ve made some customizations.
unless you’ve made some customizations, I can access the current working directory
by typing the command PWD, print working directory.
And again, this is a program and its whole job is just to print
where the working directory currently is.
So the working directory means where you’re currently at,
where you’re situated, where you’re looking at.
And it’s saying that I’m in my home folder.
In Linux, the home folders are usually slash home slash your username.
So if I want to see what’s inside of my home folder,
I can use another program called LS, which just lists the contents of a folder.
So I’m going to type LS and it tells me I’ve got all these folders,
desktop documents, downloads and so forth.
LS takes arguments.
Remember, we have arguments like if we did echo hello,
then it’ll print the word hello, but we can give the LS command some arguments too.
We can say LS, I’d like you to do, you know, some stuff.
So what do we want it to do?
Let’s make it print all the files and folders,
even those that might be hidden because they,
on Linux, if a file or folder starts with a period
in the name, it’ll usually be hidden by default.
So if we want to print everything, we can say dash a.
And if I want to print in a vertical list style,
I can put an L in front of there.
So I can say LS, which is the program
and then dash LA is the arguments I give it.
And that’s going to tell it to print my directory
with all hidden files and folders shown.
Notice how all this stuff showed up
that wasn’t there before,
like bash history.
I have a cache folder.
But then there was also some stuff
that was there before,
like the documents folder,
the music and the pictures folder,
and so forth.
So you saw these things before.
Like, let me just at least highlight one.
So you saw the videos folder there before.
You just didn’t see all those other hidden ones
because they had dots
in front of their file name.
in front of their file name or folder name depending on what they are okay and
then of course you can see that this is a vertical list and you’re getting a
little bit better now at giving arguments to programs so how did we know
that ls takes dash la as an argument or as some arguments you could search on
the internet which is pretty fast usually you can also use a program
called man the man program will give you information on another program most
programs have MAN entries so when you install the program there there will be
like a new manual page that shows up in the MAN program so I’m going to type MAN
LS and hit enter I’m basically going to launch the MAN program and I’m going to
tell it that I want information on the LS program so I hit enter and then it
sort of shows me like a big you know little instruction thing a little sheet
a little well it’s actually not little depending on the program this could be
tells you all the things that we can do with this program. So right here you can see the
dash LA part that we did earlier. Whoops, what did I do wrong? The dash LA part that we did earlier.
That’s the dash A. And we could also instead have just said dash dash all.
That’s what the manual is telling us. Where’s that dash L, the listing? Let’s see, it’s somewhere in
here. H I J K L, maybe I should do a page down.
Maybe I should do a page down.
Yeah, there we go.
So, well, there’s no dash dash list.
I was hoping that there would be a dash dash list,
but this tells you at least that you can say dash L to use a listing format.
And there’s tons of other options that you can learn and read about
if you just take some time to explore the man page.
Kind of cool, right?
Okay, so how do you get out of this?
By the way, how do you search for stuff?
I’m going to search by using the slash key.
key so like you know the the web slash key I’m gonna hit slash and then I’m
gonna type something I’m gonna say maybe block and then hit enter and notice how
it highlights on the first match I can do a regular end to go down to the next
match or I can do shift in like a capital N to go backwards up to the
previous match so this helps you you know kind of search through man pages and
things like that and the cool thing about what the man page is using right
It’s using a way to display itself.
I think it’s either using a program called less or it’s using a program that works very
similarly to a program called less.
So the program less, it’s just, it loads up a document for you and it lets you do things
like this, scroll up and down, search for things, go to a line number, you know, and
just, you know, it’s, it’s, it’s very convenient, right?
Like it pages in the terminal.
If you want to exit this, you just got to hit Q.
So I hit Q right now.
So I’m going to do man LS again, hit Q, and then I get out.
So now we know a few commands.
We know how to see where we’re at in the file system and list directories and things like that.
Let’s go into the documents directory with a special command called CD.
So CD stands for change directory.
And if I just say documents and hit enter, now the shell itself is inside of a different folder.
It was in my home folder before.
Now it’s in my documents folder.
If you’re ever unsure of where you are, use the PWD command again to figure out what’s going on.
Okay. Oh, look, I am inside of my documents folder.
If you ever find yourself in some sort of a deep, deep subfolder, let’s see.
I don’t even let’s do like user live live.
LiveX32.
Oops.
What am I doing?
There we go.
What about this library?
I’m just going into a random folder right now just to show you that we can go pretty
deep.
So I think that I’ve reached the end of that.
Okay.
So suppose I’m navigating around and I’m in some, some kind of a folder and I’m at,
I do PWD and it says, oh no, you’re like way deep in some other folder.
How do I get back to my home folder?
Well, you could type out the whole home folder if you wanted to, but the easiest way to get
pwd with no arguments.
Once you hit enter, it’ll drop back down to your home folder.
And if you’re not sure, then use the pwd command.
Okay, so we’re doing pretty well.
We’re kind of like navigating in here.
Let’s make a directory.
I’m going to go into my documents folder again.
And let’s see.
So right here I’ve got like, whoops, I’ve got some documents.
Let me make a directory called temp with the command make directory.
so uh well mkdir is the name of the program the first argument i gave it was temp and so it just
created a folder for me called temp so if i say cd temp i can now go into the folder that i just
created if i list the contents of that directory again it’s empty because i just made it pwd lets
me know where i am just to make sure when you’re new to the terminal you actually i still use this
customize my terminal so it doesn’t print the full the full path there it just prints the current
directory name so i kind of get lost sometimes so you just use the pwd command to figure out where
you are and by the way just as a reminder we could always do man and the name of a program so i’m
going to say man make dir and there’s options even for making a directory i’m not going to go over
those but just to let you know there’s a lot to explore okay so now i’m inside of the temp directory
I’ve made a folder. What if I want to go one level up? What if I don’t exactly want to drop
to the home directory, but maybe I went one level too deep and I want to go back up one level.
Well, again, I could type out the whole thing. I could say go home and I could say documents
and whatever. But by the way, I’m hitting control C when you see that care at C that usually tries
to get the current program to stop. But when you’re inside of bash, it’ll just sort of like
abort the current command and go to another line.
Okay, so how do I go up one level?
Well, in Linux, there are two special directories
that have periods in the name, well, they are periods.
The directory known as period,
actually, let me show you the full,
yeah, okay, well, the empty directory listing,
notice how it actually does show me two things.
It doesn’t show me nothing,
it shows me these two directories right here,
that’s not a mistake.
So this directory, the one with just one period, that always represents the current directory
that you’re in.
So if I use just a period to go into a directory or to do something to a directory, that period
will represent something different based on where I am.
Am I in my home folder?
Am I in the desktop?
Am I somewhere else?
The period changes based on where you are.
dot it always means i’m getting used to this new pen setup it always means it always means there we
go it looks like a emo guy with his hair like to the side um it always means the parent directory
so remember before we could type we could type cd and then some directory name right to go into a
directory uh now we can type cd dot dot and that’s basically saying we would like to change directories
change directories, we would like to go to the documents directory.
Why?
Because the documents directory is the parent directory of the temp directory.
So if I say cd dot dot, notice how it goes up one level.
Let’s do that again just to be sure.
So I’m going to say pwd, and if I say cd dot dot, and then pwd again,
notice how we were in temp, and as soon as we went up one level,
it went to documents.
So it’s just kind of a quick way.
you know, use a bunch of directory names separated by slashes.
You can also put dot dot in any directory that you want.
So like imagine I’m in the temp directory again.
I could say let’s go up one directory and then a slash and then up another directory
and then a slash and then up another directory.
And I should end up in the home folder.
Isn’t that kind of funny, right?
So I’m saying like give me the parent directory of the current directory
and then give me its parent directory and then give me its parent directory.
So I went up three levels.
its parent directory. So I went up three levels.
So let me drop to my home folder and go back into documents and go back into
temp. Whoops.
I forgot to do CD.
Now we’re getting pretty good at navigating. Let me make another directory.
I’ll call it delete me because I intend to delete this directory.
There’s a program called RM remove that lets you delete stuff.
Actually first, before we delete that, let’s use a program called touch.
and the program touch just sort of like creates a blank file.
I think if the file already exists, it won’t mess with the contents,
but let’s do an experiment in a moment.
So I’m going to say touch blank file.
It should create a file for me called blank file.
So now I’ve got a directory and a file called blank file.
Now I can remove the blank file with the RM command.
So just RM and then give it the name of the file.
Be careful with RM.
He’ll destroy your file system if you’re not careful.
and now let’s remove the delete me folder when you try to remove folders you have to tell the
remove command that you intend to delete a folder by specifying also the dash r command which means
this is a folder i would like you to recursively delete it so let me just type it without that
real fast and it says hey i can’t do it it’s a directory so i’m going to say all right now
And it did it.
Some other useful flags you might want in the future.
The first one that I like is V for Verbo.
So it’ll print everything that it deletes.
And F for Force.
If you’re absolutely sure that you know exactly what you’re about to delete,
then Force will make it so that this program won’t start asking you,
are you sure? Are you sure? Are you sure?
So it’s kind of dangerous, but it’s also pretty convenient.
Imagine that.
Anyway, so let’s see what else can I when I talk about here, we know how to like touch to create a blank file and create a folder and navigate all around. Let’s edit a file. Let’s actually edit a file in the terminal. So there’s kind of like an age old argument between the Vim people, or the V people, and the nano people. And so I just want to say that if you were a Vim person, don’t ever talk to me again for the rest of your life.
again for the rest of your life just kidding you’re okay we can sort of be
friends but I’m personally a nano person so what am I talking about nano is just
another program it may or may not be on your system I think on a boon to it
should be there by default let me just double check yeah it should be there by
default we’ll talk about how to install programs in a second I’ll go sudo apt
install just to remind myself but so you type nano to execute the nano program
of a file that you want to edit.
So let’s edit a file called my program.
Whoops, program.cpp, just if you’re writing some code.
And this tells the nano program that you would like
to edit this file named my program.cpp.
You hit enter and you have like a nice little editor
that shows up.
Notice at the bottom,
you have a bunch of little shortcuts, right?
So if you do, actually let’s look at this one
Actually, let’s look at this one over here first.
If you hit control O, that means save the file, write it out.
If you hit control X, that means you’d like to exit the editor.
So if I want to get rid of the editor and just like, you know, go back to the terminal,
the normal command line, I’ll do control X.
There’s a bunch of other stuff you can do.
And there’s like a big help menu.
alt n to see line numbers in nano so that makes it a lot more convenient for coding so i’m going
to do alt n to get those lines off let me just type the word hello real fast hello
okay so now i want to save this let’s do uh we can do control o to just save it but we’ll stay
inside of the editor or we can do control x to save it and then exit the editor so i think i’m
going to exit them say control x notice how at the bottom it asks me do i want to save the modified
That just means I’ve been editing inside of this like, you know, temporary area.
Do I want to actually save it?
So I’m going to hit Y for yes.
Then it asks me, you know, what’s the name of the file that you want to save?
Well, since I specified my program when I launched Nano, it already knows what I want to do.
If you didn’t specify the name of a file, then you could provide it here.
So I’m just going to hit enter.
And now the program exits.
If I list the contents of the directory, I can see that I now have
the world’s worst C++ program ever because it’s just hello that’s not going
to compile so how do I see the contents of a file with the terminal well for
starters obviously you could just type the name of the program again for nano
and it’ll show you there it is I’m gonna hit ctrl X to exit out of it but
there’s another popular command that people like to use called cat cat
basically will go to a file load it into memory and spill it onto the terminal
to the terminal for you. I mean really what it does is it prints to something called standard
output and then the shell interpreter grabs standard output and it you know renders it to
the terminal but we’ll just say that this prints it to the terminal. So if I say cat and the name
of my program then it prints it to the terminal so you can check any program this way. Do yourself
a favor well do me a favor and do cat at the following path etc os release. The etc
The etc directory off of the root of the file system in Linux is usually where all of the
configuration files get stored.
At least the ones that are system wide.
So like system wide programs, their configurations are usually in the etc folder.
So there’s a special file in many operating systems, definitely Ubuntu, called OS release,
which just describes the operating system to you.
So here, if you’re not sure what operating system you’re using, or if you just want to
and kind of see information on it.
Well, you can say cat, etc.
OS release and see your OS.
So there it is, all this stuff.
Pretty fun.
Okay, so we did my program.
Let’s edit my program real fast.
I’m going to go myprogram.cvp.
And if I want to just say, I don’t know,
maybe I want to make this look a little bit more like a program.
So I can say integer main and we’ll just pretend that we’re not going to do any arguments.
Return zero.
So this probably would compile.
I think this would compile.
If not, then you might have to go into the number of arguments and then…
Don’t worry about this.
This is not a programming video.
A character pointer.
I can never remember if the brackets go before or after the variable name.
a new program i usually compile it both ways and see which one works um okay so oh i did it too
fast okay so i edited and uh if i want to just save my changes i’m going to say control o
notice how it asked me again at the bottom do you want to save it under the same name i just say
enter to say yes if i uh wanted to instead just exit the program i do control x and then
inside a weird area where you can’t really hit keys and you can’t exit very
well you might be inside of Vim some some operating system use Vim as the
default or some some programs so I’m gonna just enter Vim manually whoops
what am I doing is it Vim or V so I’m not a Vim user okay there we go so Vim is
like you know it’s very complicated some people say it’s lightning fast and it’s
By the time you need so many features,
you might as well just mount the remote file system
and use an actual graphical editor.
I’m just not a fan.
Don’t hate me.
You know, we can still be friends.
So if you’re inside of Vim, you hit the insert key
and then you can kind of like type and stuff like that.
So it’s whatever, but what?
Insert?
Okay.
I’m getting lost already inside of Vim.
I’m just going to delete this stuff that I created and so if you want to exit from
Vim hit the escape key first to make sure you’re not inside of insert mode or any
special mode and then say shift holen to enter command mode you’ll know you’re in
command mode because you see this little colon here next to your prompt or next
to a prompt and then I’m gonna say write quit write quit means save the file and
and then quit if you want to quit without saving the file you can just put q but uh vim will
complain if you’ve actually changed something and you’re refusing to save the changes so if you are
absolutely sure you want to discard the changes just say yes i want to quit with an exclamation
point so q exclamation hit enter now you’re out of vim hopefully you’ll never go back for the rest
of your life sorry okay so now we know you know a lot of a lot of stuff that we can do in the
Maybe we should learn how to install programs real fast or search for programs.
And then we’ll do a little bit of some graphical stuff.
Alright, so here’s the command that I wanted to remind myself of.
So how do we search for programs?
If you didn’t know this already, almost every single Linux distribution has a repository
of pre-compiled programs that are open source that you can use for free.
better and a lot safer than the old Windows method of just sort of like going
to random websites online and downloading programs and just kind of crossing your
fingers that you didn’t just download a virus.
What happens is the people who run the operating system, they’ll take the source
code for popular programs and packages.
They’ll compile it for you.
They’ll store the binaries, which are just the compiled executable files.
And then you can use certain command line tools to install those programs one by one.
those programs one by one there’s so many available that it wouldn’t make sense to install them all
by default because you’ll probably never use the vast majority but so we have a nice package
manager in ubuntu called apt it’s the apt package manager if you want to see more information about
it let’s see is it called aptitude or just apt we can say man apt yeah it’s just a command line
interface this actually i think this talks to d package under the hood but you know it’s just a
the package manager one of the sub commands for apt is search so we can say uh launch the apt
program with apt then we could say apt i would like you to search and what would you like app
to search for i don’t know how about a program called mousepad it’s one of my favorite text
editors on linux so what it does is it searches the ubuntu repositories and it tries to find you
know a package or a program that matches and if it does it’ll show you the listing okay so what do i
listing. Okay, so what do I have here? Mousepad is already installed on this system. Yeah,
that makes sense because I think I was just using it. And, you know, some other stuff that
you could find. So you can just kind of search for for anything like do you want a free accounting
program that you don’t have to pay for? It’s not necessarily going to be the best, you know,
but it’s free and it works and it’s good and a lot of people swear by it. Well, you can search
and there it is i don’t have it installed on this machine but new cache free accounting software
do you want to learn to make memes against your enemies well there’s a program for that called
gimp it’s basically it’s kind of like at this point i think an old school photoshop clone
not clone but alternative it’s really good for memes and there are actually a lot of very
talented people who use gimp to do like very artistic things so there it is right there gimp
and it’s GIMP because it’s the GNU image manipulation program.
There’s also another one that’s a little bit more artistic, I think.
I haven’t used it.
I think I used it once.
It’s called Krita.
Oops, sorry, not apt-Krita, apt-search-Krita.
And there it is.
So there’s like a bunch of different choices for any idea that you could have.
Just think of what you want.
You want another browser, another image editor.
You want accounting software.
accounting software you want an audio let’s see is there I think there’s one called our door let
me see apt search you want to like mix music at home so I want to type the name of the program
our door but I want to see if I can find it by just searching for a music term let’s say a
DAW digital audio workstation let me scroll up a little bit yeah there it is okay so I searched
program that came up right here it’s like a very very very popular free and open source
digital audio workstation with like so many tracks that you can mix and and effects and
you can record with it and do all these crazy things um so i’m just trying to show you that
linux is not just for you know coding and and boring stuff there’s there’s a lot of fun stuff
on linux that you can access for free uh through these repositories okay so let’s actually install
Suppose I’m ready to make memes against my enemies.
So I’m going to say sudo apt install instead of search install.
And I’m just going to type the name of the program GIMP.
Oh wait, hang on.
I’m not supposed to show you sudo just yet.
So let’s do sudo, let’s do apt install GIMP.
By the way, sudo is supposedly outdated and people are saying you should use something
else, but I don’t know.
Old habits die hard.
apt install GIMP, the system is telling me that I don’t have permission to install a program
on this machine. And that makes sense. That’s probably a good thing, right? You don’t want to
just let any user totally, you know, redo your system. So it’s saying, you know, could not open
the lock file permission denied. Oh, no. Unable to acquire the d package front end lock. Are you
root? Oh, okay. So what this is basically saying is that in order for us to do root level activities,
like install a program on the system, we need to elevate the command line to root.
And how we do that is we pretty much just say sudo, which is the name of a program that
helps us quickly elevate. It also actually does like a lot of other stuff, but
for now, we’re just going to use it to elevate the command up to root.
So if I say sudo apt install gimp, what’s happening is the sudo program gets invoked,
and then it just executes apt install GIMP as root.
Let me just prove to you that sudo will elevate a command.
So if I go, who am I?
It’ll tell you the name of the current user.
If I say sudo who am I,
then sudo will launch who am I as the root user.
And then who am I should tell us,
whoops, got to enter the sudo password.
You actually have to be an admin to use sudo, just FYI.
So if I say sudo who am I, notice how it prints root.
So if I say sudo apt install gimp, it’s really just going to invoke apt install gimp as the
root user and it should allow me to install that program.
Gimp is already installed.
Okay, I guess I was making memes earlier and I forgot about it.
Well we could remove it.
Gimp.
Then it removes it.
Yes.
I don’t think I was making memes on this machine.
I think something funny is going on here.
And now that it’s removed, I could install it again if I wanted to.
I could say sudo apt install Gimp, and then it might ask you to push yes and enter.
And then it just kind of finishes.
Also if when you’re trying to install things, you get a message that says, repository could
like a 404 error cannot be connected to not found your repos out of date you know whatever that
might just mean you need to update your system so i’m going to say sudo apt update telling apt that
i would like to update its idea of all the packages and then sudo apt upgrade
so update just contacts the server and gets an idea of what packages there are and their versions
the system or it actually upgrades the system when you’re done with that you
usually want to do auto remove to just kind of get rid of any junk that’s left
over if you happen to remove things recently this stuff up here this is sort
of like a corporate upsell you can probably ignore that at least for now
but yeah so we know how to like do lots of stuff in the terminal just just to
open up the let’s see we’re inside of the temp folder okay so I have the temp
folder inside the terminal I’m gonna open up my file system here and I’m gonna
go into the same path so we were inside of let me just show you again with PWD
we were inside of home mic documents temp so let me go inside of the home
folder it’s not downloads documents temp and notice how I have the same file
I can right click on this or even double click on it and I can open it up with
Mousepad or even this nifty little code editor called genie if you’re interested in genie
It’s actually pretty nice pseudo apt install genie and it’ll tell me that this program is already installed
I like to use it because you know vs code and other IDEs. They’re great for productivity
But they kind of help you a lot and if you’re trying to learn, you know coding or whatever
or whatever sometimes it’s a little bit better if you just use something kind of plain because
then you’ll learn more it’s harder uh you know that’s up to you anyway so i’m gonna right click
on this and i’m gonna say let’s open this up with the how about mousepad i guess
now i am graphically editing uh this file because maybe maybe you want to you know edit everything
in nano maybe you don’t maybe you only want to use the terminal when you have to but uh well
have to but well here you are let me do a cat command let’s see my program cat
notice how it’s the same exact file I can I don’t know maybe put some empty
comments up above the function name for fun and save the document and then just
kind of do the cat command again and you can see that my changes have been
updated so you can delete in the regular file system here in XFCE the file
thunar and there should be a symbol somewhere or if you just kind of hit the start menu let’s see
how about office where is thunar usually oh it’s in accessories okay and then if you’re on a gnome
uh it’s probably just called files or i forget what the name of the file system is but you know
something that just looks like a folder um so we’ve edited that we’ve got all the basics here
we know how to navigate we know how to get to our home folder we’re like making directories
deleting directories removing files touching files editing files we’re doing a lot and just to let
you know there’s like so much more you can do on the terminal for instance you can let’s see do we
have gcc on this computer no gcc is what people use to code in c plus plus right so i’m gonna say
package on Ubuntu called build essential.
I think it’s singular, not plural.
And this is sort of like a meta package, which means it’s like a dummy package
that installs a bunch of other packages.
So build essential.
It’ll grab all these other programs for you for like,
it looks like a bunch of C++ stuff and there should be like GNU Mac in there
and some Perl stuff, I guess.
Yeah, I’ve never actually looked at this.
That’s not a lot of stuff that I use.
There’s just a few things that I use in there.
But anyway, you install that and then you’ll get GCC,
which will help you code in C++.
You can also do sudo apt install,
Yasm to install your assembler.
What else?
So GCC and G++ and Yasm and make and an editor.
I think that’s kind of like almost all you need.
Well, you can install a debugger,
Well, you can install a debugger sudo apt install
GDB to install your GNU debugger, which is already installed.
Okay.
Anyway, well, just to let you know, we can do GCC to compile some programs.
It’ll complain.
We don’t have anything.
Let’s see.
Actually, let me go in there.
Let me go to documents temp.
Let’s see if it’ll compile this just as is GCC my program output.
And I’ll just say that we want a program called main.
It’s going to work.
main is this going to work did it actually work oh my gosh i got it right on the first try even
though it was an empty program doesn’t really do anything oh by the way um in linux or in the
command line you probably will see a lot of people do this sort of thing where it’s like dot
slash in the name of a program the thing is in order to execute a program uh i’ll tell you about
permissions in a second first it needs permission to execute but then you need to provide a path
path to the program. You can’t just type main as is because the system, you know, the shell is going
to think that you’re talking about a system program somewhere. So it’s going to look in all the system
areas and it doesn’t find a program named main. So you have to give it a path to your custom
programs to run. So I’m going to say dot slash main. And basically remember the dot was a special
directory that meant the current directory. So if I type dot main, it’s actually kind of the same
home mic documents temp main.
So if I just type this whole path right here, it runs the program
or I can do, you know, dot slash main.
It also runs the program.
In both cases, it works.
Let me edit this real fast to see if I can just get something exciting going on here.
I’ll stream and then I’m just going to go.
Okay, so I’m just going to like do that.
just gonna like do that let me try to compile again gcc my program output to
execute what called me oh what did I do wrong oh gcc is for just regular C
programs you’re not supposed to do that I want to use G plus plus and then I’m
gonna say standard library I don’t know C plus 21 or something std what did I do
Is 21 not a valid year?
I don’t even remember.
I’ve been using C++17 forever.
What did I do wrong?
STD equals C++.
Okay, 17 I know definitely works.
What am I doing wrong here?
Okay, so 17, I guess 19 wasn’t a thing.
Been using 17 for a long time.
Okay, so I just compiled the program again with the C++17.
Well, then what the heck was I doing yesterday?
Was I using 23?
Hang on, sorry.
I forgot what standard I was on yesterday.
Okay.
So then if we run the program again, it prints a message.
So maybe I should retitle this video, your first C++ program, because that’s literally
what we just did.
You know, I’ll make another video.
the basics of the Linux command line.
And well, you’re off.
Well, I hope you enjoyed this video and you learned a little bit of stuff.
Keep watching all the other videos and I’ll see you in the next one.
Hey, everybody.
Thanks for watching this video again from the bottom of my heart.
I really appreciate it.
I do hope you did learn something and have some fun.
If you could do me a please, a small little favor, could you please subscribe and follow this channel or these videos or whatever it is you do on the current social media website that you’re looking at right now.
It would really mean the world to me and it’ll help make more videos and grow this community.
So we’ll be able to do more videos, longer videos, better videos, or just I’ll be able to keep making videos in general.
So please do me a kindness and subscribe.
the middle of the night and I just wake up because I know somebody subscribed or followed.
It just wakes me up and I get filled with joy. That’s exactly what happens every single time.
So you could do it as a nice favor to me or you could troll me if you want to just wake me up in
the middle of the night. Just subscribe and then I’ll just wake up. I promise that’s what will
happen. Also, if you look at the middle of the screen right now, you should see a QR code which
you can scan in order to go to the website, which I think is also named somewhere at the bottom of
to my main website where you can just kind of like see all the videos i published and the services
and tutorials and things that i offer and all that good stuff and uh if you have a suggestion
for uh uh clarifications or errata or just future videos that you want to see please leave a comment
or if you just want to say hey what’s up what’s going on you know just send me a comment whatever
i also wake up for those in the middle of the night i get i wake up in a cold sweat and i’m like
it would really mean the world to me. I would really appreciate it. So again,
thank you so much for watching this video and enjoy the cool music as I fade into the darkness,
which is coming for us all.
Thank you.