yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Terminal Lesson 11


2m read
·Nov 3, 2024

Processing might take a few minutes. Refresh later.

M kids, here today I'm just going to be showing you a quick tutorial on how to run an executable like something that you've made with chmod +x from a terminal. Some of you have had issues with opening something from your desktop; well, I'm going to show you how to run stuff right through a terminal.

First of all, I'm going to cd to my desktop because I have these nice two great executables on my desktop. And, um, I'm going to be showing you how we are going to run them. First of all, I'm going to be running screen_saver. Right now, I'm going to type pwd, and I'm going to do this two ways.

First of all, I'm going to do ./screen_saver, and . just means my current path. So that's /home/user/Alex/desktop/screen_saver, and all I have to do is type the p of the executable, and now my screen_saver program is running like such. Um, so I'm just going to ctrl+c out of this, and, um, now I can also just type the full path like /users/user/Alex/desktop/screen_saver and that's the full path of it. I just hit enter, and it'll start running.

So now, um, I can also do this for crash_screen, which is another executable I have here on my desktop. So let's start by typing /home/user/Alex/desktop/crash_screen. Now, I have to type the... I don't have to type the full path; I could just put . there instead of this scrap. So yeah, I hit enter, and my crash_screen program is running like such.

Um, so I've just showed you how to launch an executable from the terminal. I'm going to explain one more thing to you that, um, when you start an executable, you can't just be say I'm in my desktop, and there's something crash_screen. You have to still type the path of crash_screen, like /crash_screen. At least, you can't just type crash_screen or it'll think crash_screen is a standard command. You have to type the path of it like /crash_screen.

So, yeah, now I'm just going to cd .. back to my home directory. cd .. goes back, and it actually goes back by one directory. So if I was in /home/user/Alex/desktop, it would go back to /home/user/Alex and take off the desktop. So now I'm back here in my home directory. Doing /crash_screen won't work anymore because those executables are on my desktop, and this is my home directory.

So what I could do, there are two ways. I can either type /home/user/Alex/desktop/crash_screen to launch crash_screen that's on my desktop, or I could type ~/desktop/crash_screen. What that will do is it's going to take my home directory and that's going to be good enough to launch it.

So now, um, yeah, that's how to do it. It's, um, very simple and easy. Um, thanks for watching, M kids, and subscribe...

More Articles

View All
Planet or Plastic? | Explorer's Fest
[Applause] Some of you may have seen or heard about that classic film called The Graduate, starring Dustin Hoffman. As a young graduate was advised by the crusty businessman, “The future, my boy, is plastics.” Think 1960s, when plastics in our society wer…
Bad Investing Mistakes That Make Me Cringe...
Hey guys, welcome back to the channel! In this video, we’re going to be talking about three specific investing mistakes that, in all honesty, these ones like really make me cringe. Like, not gonna lie! And in all honesty, I see people make these mistakes …
Let's use video to reinvent education - Salman Khan
[Music] [Applause] KH Academy is most known for its collection of videos. So before I go any further, let me show you a little bit of a montage. So the hypotenuse is now going to be five. This animal’s fossils are only found in this area of South America.…
8 Daily Habits That Changed My Life
What’s up, you guys? It’s Graham here. So, the new year is fast approaching. It’s almost going to be 2020, and for some reason, I still think that five years ago was 2010. But anyway, as we get closer to the new year, people begin creating their New Year…
The Warning Of Hyper Inflation | $2 Trillion Stimulus
What’s up you guys, it’s Graham here. So I’m gonna be attempting to answer one of the most difficult questions that I’ve been getting asked recently here in the channel after this new stimulus plan was recently passed, and that would be: Am I still wearin…
From mach-20 glider to humming bird drone - Regina Dugan
[Music] [Applause] You should be nice to nerds. In fact, I’d go so far as to say if you don’t already have a nerd in your life, you should get one. I’m just saying scientists and engineers change the world. I’d like to tell you about a magical place calle…