Linux Command Line


The Linux Command Line show is designed to introduce viewers to working on Linux based computers using only the command line interface. This is considered the first step in learning BASH scripting as most scripts are made up of a series of CLI commands.
Linux Command Line Overview
In this episode, Daniel and Don take a look how to use a Linux terminal to gain access to the command line. They demonstrate Gnome terminal, Xterm, Konsole and several other terminals and walk through their configruation and use.
Clock icon0h 35m
Welcome to ITProTV. I'm your host, Don Pezet [CROSSTALK] [MUSIC] You're watching ITProTV. All right, greetings everyone and welcome to another great episode of ITProTV. I'm your host Daniel Lowrie, and in today's episode we are kicking off our Linux command line series. It's gonna be a lot of fun, gonna learn a lot about Linux. And joining us in the studio, our good friend, Mr. Don Pezet. Don, welcome to the show, sir. Thanks for coming today. Hey, thanks for having me, Daniel. And this is a really fun topic for me. Diving into the shell and actually getting these working. We've got a series coming up on batch scripting that's gonna have a ton of really cool things that you can do that are all driven by the command line. So we need to know how to get in and interact with that shell, interact with the interface that we have, to actually kind of talk right to the Linux kernel and get to do some really neat stuff. And one of the things that I always try and remember is that in the Linux world, almost everything is developed from the command line first, and then eventually gets a nice little GUI stuck on it, a graphical user interface. But if you just stick in the graphical environment, you're really limited, there's only so many things you can do. And when you pull those shackles off and dive right into the command line, sky's the limit. So you can do so much stuff. So I'm excited to dive into it here in this episode, and really the whole series, to be able to see what we can do from the command line, how we can use it, and some of the neat utilities that are there that let us talk to that system. Well, Don, when we start talking about terminals, right, the command line stuff, there are terminals. It's a little black box that pops up and we type command into it. And we think, that's kind of vanilla. But there's a bit more to it than that, right? Yeah, in the olden days where we had a mainframe or something in that nature, you would have a dummy terminal. And a dummy terminal was a keyboard and a monitor, and when you sat down at it, you would just see a command prompt. You didn't have a graphical user interface, you didn't have a mouse. But on most computers these days, when you sit down at them, you actually get a graphical user interface. So that the terminal, the command line, is kind of hidden away behind the scenes, right? So we need to know how to get to it. And fortunately, there's actually a number of different ways to get to it. Now, remember that Linux, whether it's running as a desktop or whether it's running as a server, it really is the same under the hood. There's a lot of operating systems that differentiate. You have Windows Server versus Windows Desktop, two different products. But in the Linux world, it's really the same. The big difference is that when you install Linux as a server, you normally leave the GUI off. So if you push the power button on a Linux server, on the screen you see the text-based terminal, the command prompt that you can jump into and start to work with, right? But if you do it on a desktop, you get a graphic user interface. Some people put a graphic user interface on a server. But you're not really supposed to, but you can. So either way, if we get the graphical interface, how do we get at it? Well, it's not that the text-based one is gone, the text-based one is just kind of hidden away. So let me show you here on my laptop. So this is my laptop, I use it every single day, and so I have a graphical user interface on it because I don't want to do everything from the command shell. Although, I do a surprising amount of things. Quite a bit, yeah. [LAUGH] So when I log in, it's graphical, right? So I can launch in here and I can browse my files, and do all the different things that I need to do right here through a GUI. And then that's great, right? But if I want to access the terminal, the command prompt is actually running in the background. I just don't see it, right? On most Linux distributions, you actually have usually about six text-mode terminals that are running in the background you're just not seeing, right? They fire up briefly while the computer's booting up, and then the GUI loads and takes over from there. So I'm in X Windows but no Window managers, all kind of running and giving a GUI. If you wanna see the text based stuff, you can, but it's not as good as it used to be. And the main problem with that is high resolution monitors. So the monitor on my laptop, I forget my resolution, it's something like 3,200 by 1,800 something ridiculous like that. Crazy. And high resolution monitor, even like a 1920 by 1080 monitor these days makes the terminal almost unreadable. It's like a postage stamp on your screen, it's crazy. It's really tiny. So here, let me pull mine up. And I'm just gonna switch right over to one of my text-mode terminals. So you're gonna see my monitor blank out, and then there it is, okay? I'm now in a text-mode terminal. And it's asking me to login. Now, how do I know that? [LAUGH] Because if you look, I mean, that is really, really small. I know for you guys in TV land, you're seeing this in the little boxed in view. But even if you were to full screen it, it's really small. Even looking at my own monitor, it is really small, I can barely read it. And unfortunately, there's no way for me to adjust that without like really going in and re-engineering this terminal. You have to put in a giant font and all this other stuff, so there's not an easy way to do it. As a result, this is not how we normally access the terminal. If you do, if you ever want to do this, the keyboard shortcuts are Ctrl+Alt+F1. And it's usually Ctrl+ F1 through F7, and one of those will have the GUI, okay? Most operating systems today put the GUI on F1. So if I hit ctrl+alt+F1, it should return me back to my GUI, all right? Some distros put it one F7, though. And you hit Ctrl+Alt+F7, and there you go. Meanwhile, one through six, or whatever ones aren't used, those are the text-based terminals. So they're there, they're running, and you use them. If you ever lock up your graphical user interface and you're stuck, you can drop to one of those terminals and try and fix the problem, it's nice to have, if you also have a magnifying glass [LAUGH]. [LAUGH] So that's not the normal way that we get into our command prompt, to get into that kind session to talk to the Linux kernel. So instead, what we normally use is a terminal program. And there are a number of different terminal programs that are available. And what you'll find is that over time, you'll find one you really like, that you'll kind of bond with, you'll team up and be buddies. That's like the Linux manifesto, right? Is do it the way you like to do it and there's many options on the smorgasbord of different things that do kinda the same stuff, right? Yeah, absolutely. And there's no right or wrong answer here. You need to find the one that works out the best for you. Now, the best piece of advice I can give you is don't just use what I use, because what I use is just what I like. And I get a little bit lazy sometimes, not lazy as in I don't want to do work, but lazy as in I'm in a hurry and I want to get to a terminal as fast as I can. There might be some flashy terminal that has a lot of bells and whistles that's awesome. But if it's not installed by default, I don't want to deal with it cuz I don't have time to install the terminal. I want to use something that's already there. So a lot of times, I'll pick one that I know is not as feature rich. So don't let me influence you. You need to find out what works for you. Or you might agree with me and say, hey, I only want to use stuff that's installed natively. I don't want to have to install extra packages to get to some crazy terminal. Now, when you install your Linux distro, it will have at least one terminal available. And so you can use whatever GUI you've got, if you got Unity, or I'm on GNOME here, if you have KDE. When you bring up your menu and you just type in terminal, something's going to come up, okay? Now, I have a number of terminals installed in my machine, so I see several choices. But you may only see one, right? It just depends on the distro. And the one that you'll normally have is this guy right here, he's called Xterm, right? The X Windows GUI is kind of the defacto standard for graphical interfaces. Now, it's changing. We have a replacement for X Windows called, or Xterm is what that's actually called, that's slowly being replaced by a product called Mir. And, or sorry, not Mir, Wayland. There we go [LAUGH]. Gotta get my managers right. So Wayland is kinda taking over, so you might not have XTerm in that case. In which case, you have other terminals that might be available. But normally, a distro will take some terminal and label it as just plain old terminal, okay? Now in a GNOME environment that's actually what's called the GNOME Terminal. In a KDE environment, this would be linking to what's called Konsole. Which I actually have installed also, Konsole with a K. This is from KDE. But there are other terminals that are out there that you might see. All of them provide the same basic functionality. But then some of them add a lot of bells and whistles that enable you to do some really neat things. So if I were to launch into xterm, that's the oldest one. That's the most basic terminal. And when I get into it, I see- A postage stamp. It's pretty small. [LAUGH] And if I were to zoom in, I can read it now, right? But xterm is really operating the same way as those text mode terminals in the background. It's just putting a GUI wrapper around that terminal. And I can get in and I can do some set term commands to try and change the background color. And other things to try and make it useful. But as far as the GUI is concerned, there's not really any options for me. There's not much of a menu here other than minimize and maximize. And even if I go up to the menu items up here, there's just quit. I don't get a lot of functionality with xterm. This was the original, graphical terminal that was made available and so it's got a very basic set. So most of us aren't gonna use that one. Most of us are gonna use GNOME Term or Konsole if you're in KDE. But GNOME Term is really the most popular one. If you're running Ubuntu, Debian, Fedora, RedHat, Centos. All of those distros default to Gnome Term. Ubuntu is using the Unity window manager. But the Unity window manager actually uses GNOME Term as its terminal. So even though it's not GNOME, it's still using that terminal. So that's kind of the most popular one. And that's the one that I'm gonna use for the rest of this series. So for the whole series, I'm going to be using the GNOME Terminal. But I wanna walk you through a few of the other terminals here in this episode to give you an idea of which ones might be great or which ones might be lame. They get kind of fancy, don't they, Don? They really do. Some of them, some have some really impressive feature sets. So, for example, let me just fire up real quick. We'll breeze through a few real quick and then I'll do a deeper dive into some of them. So, for example, the GNOME Termina. If I just fire up my terminal, this is the GNOME Terminal, the default built one in. See how I got a nice big font? Well, it didn't have that by default but I was able to change it because I've got all these menu options up here where I can tweak it. I can change the font size. I can change the colors. I can change what's being rendered. There's a lot that you can do [CROSSTALK]. I love the fact that once you make those changes, a lot of these will have profiles you can create. And say, I want this to be my default profile. And that way if I want to do different things, I can just load different profiles that's already preset for me. That is a fantastic option on newer style terminals like this. Yeah, and some of the other features they add really take advantage of the GUI. If I need more than one terminal open, I can open more than one window, right? You can go up here to file and open terminal and now I've got two terminal windows open so I could run two different commands. But this one actually have tabbed terminals as well. Under that file option here, I had open tab. And so now I could have two tabs, or three tabs, or four tabs. You just do Ctrl+Shift+T and I get more and more tabs. So I might run something like, maybe I run Midnight Commander which I don't have installed, so let me install Midnight Commander. So I'm installing a program here and while it's installing I could jump over to another tab and be doing work. And then when I come back to the first tab, it finished installing. I can run Midnight Commander so now it's running. And I can switch over to another tab and perform more work. And so I can take advantage of those tabs to do more than one thing all from right inside of the terminal. So that's kind of a nice feature to have that we didn't have in the older xterm. Or you definitely don't have in the text-based console if I do Ctrl+Alt+F1. Although I could Ctrl+Alt+F1, F2, F3 and move between them. That was the earliest form of multitasking. That you could run these full screen or locked applications that would lock your session and just switch over to another terminal and fire up more applications that way. So you had that functionality. Now, GNOME Term is pretty powerful. But there're some things that it doesn't do that other consoles or other terminals might do that you appreciate. So, for example, I use one called Guake, G-U-A-K-E. Guake is nice because it is built off of, it's actually modeled after the old video game Quake. In the video game Quake, it was one of the first video games that had a dropdown console. You could hit, I think it was tilde on the keyboard. And this little console would drop down from the top of the screen, and you could type in cheat codes. It's really all you ever type. For people like me that use a terminal a lot. I'm constantly going to the terminal. I don't necessarily want it to be a window that pops up like this. I would like it just to be something that I can quickly access. And if you install Guake, it's running in the background. I've actually got a little tool item, whoops, somewhere up here that shows it. Well, anyhow, it's way up here. This little tool item and I can hit F12 on on my keyboard and there's a console that pops up and I have that access. And so if I wanna jump in and run something really quick I can. And it's really handy if I'm, now, I'm browsing on the internet and I come across some tutorial, right? So maybe I'm doing a Vim tutorial to learn some Vim commands. And so I'm here and I'm reading about how to do something and then I pull up that terminal. I run something real quick. I get it out of the way. And so just tied to my F12 key, I can make that pop up and come and go, so that's a neat feature. It's a different terminal but I like it because it gives me some functionality that I don't have in the normal terminal. Another one that I use from time to time is Terminator. Terminator is a third-party terminal. It's available in Ubuntu, and Debian, Fedora, it's available in all of them. And it has a neat function that let's you split the screen, right? In GNOME Terminal, I could do tabs and if I had multiple tabs I could have multiple terminals but I couldn't see them both at the same time, right? If I wanted to see more then one thing at the same time, I could fire up Terminator. And with a simple right-click I can split horizontally, or split vertically, so I'll do a vertical split. And now I've got two terminals side-by-side. And I could even come in and take one and I could split it horizontally. And now I'm starting to lay these out where I've got all these different terminals. And that's handy because I might be running something like htop here. So I'm monitoring performance on my server. And then down here, maybe I'm doing a little journal CTL-F. And so I'm following my system d-logs, right. So now in the top left, I'm seeing system performance. In the bottom left, I'm seeing what's going on. And in the right, I could be doing my work. I could come in and I could say, well, I need to restart some service. I'll restart I don't know, I'll restart my network stack, right. Why not? So I'll restart something and I can see the log messages down here being generated as part of that restart. And I can see any CPU or memory activity that was modified by it. And I could start to do more than one task. That's a pretty neat function. By being able to slice your screen up like this, is not something I could do in GNOME. But I can easily do it right here in Terminator. So that's where I go back in saying when it comes to picking a terminal, there's a ton of them that are out there and you need to find the one that you like best. These guys right here, they each have some kind of shining advantage to them, right? Terminator can split the screen but it's not installed by default. I would have to install it if I wanted to use it, right? So if I'm in a hurry on a system, I might not want to install it. I might wanna use something that's built-in. But boy, slicing up the screen like this is pretty handy, right? Same thing goes for Guake. It's really nice to have that drop down from the top that I have to install it and get it set up. It's not installed by default. So I might not wanna deal with that. It's kind of a pros and cons type approach. You need to find out which one meets your needs. Yeah, Don, and I really like how it splits the screen for you. Because if you've ever tried to, and even if you come from a Windows background. And you're like, let me check out this Linux thing. You have the black screens and you're moving around. You're trying to, I'll snap to this side, snap to that side. And try to get everything to look just like you like. Where I'm just, okay, split this, split that, and it's kind of doing that for me. It takes a lot of the hard work out of it, of getting everything lined up perfectly. And that kind of takes us into something else, Don, which we kind of alluded to, which was customizing these terminals. Can you walk us through some of that customization? Yeah, so let me fire up my regular Gnome terminal again. And I want to show you guys profiles, right? Profiles, Daniel mentioned them earlier, are a way that we can kind of customize our terminal. And change the way that it appears and get it to suit our needs. The default profile for most systems is not something that I like. It's usually very small, it's maybe not a font that I like. And so I usually do some customizations there that are part of my user profile. I bring it along with me when I sit down at a new system. So if I wanna go in and take a look at that. What we do is inside of Gnome, if you take a look at your menus up top, or inside a Gnome terminal. We can go to Edit, and under Edit you'll see two options, there's Preferences, and Profile Preferences. And that is a little bit confusing, why do I have these two things that are very similar? Preferences, those are settings that affect the entire terminal, right? Not just my little session inside of it. And the Profile Preferences, that's what affects my session. So let's start with Preferences, and kind of see what's in there. You'll find that there's actually not a whole lot of options tucked away inside of this. So taking a quick glance at it, first I've got, Show menubar by default. Well, I need my menubar, that's why I'm in the options. But if you've memorized all the keyboard shortcuts, you might not need that menubar. You can get a little more screen real estate. Enable mnemonics, such as Alt+F to open the File menu, right? Those are turned off by default because we might need to send Alt+F to the program running inside of the terminal, right? But if you use those, you can turn it on. This is one that I usually turn off, this is on by default. Enable the menu accelerator key, F10 by default. Which means if you hit F10, the next series of keys you hit is being sent to the menu for the terminal. Well, there's a lot of programs like Midnight Commander that I ran earlier. F10 is the key to exit Midnight Commander. If it's mapped to the terminal, that's gonna make it where I can't exit Midnight Commander, it's a [LAUGH]. Open another terminal, and [LAUGH]. You could, you find a way around it. But it's neat that we can come in and we can change that. And then you've got themes. So we can do the Light theme or the Dark theme. You got shortcuts that you can define. You can override keyboard shortcuts to set them with different themes. Maybe you just don't find the default ones very intuitive. The Profiles I'll talk about in a second. And then the Encodings, right? If you're here in the US, it usually defaults to UTF-8, which is probably what this one is at. Let's find out, yeah, UTF-8. But if you are in another country, if you're typing in other languages. Well, UTF-8 is designed to be universal, that's what the whole U part is. But some languages still aren't perfect with that. So you will see where there's other character sets that you can use. Like Greek or Cyrillic to be able to support your alphabet and render it better on screen. So those are things we can change. None of those settings that I just showed you have to do with font size, or color, or performance of the console itself. So these are all just kinda general settings that apply to the terminal. Under Profiles, this is where we create Profiles. And you'll have one profile by default it's usually called Default. I've renamed mine Don's Custom, but you can call it whatever you want. You can have one or more Profiles, and the Profiles are where all your special settings really end up. That's where the real work gets done inside of these things. So if I have a shared computer that I use alongside Daniel. He might have his profile and I have my own profile, and we can easily switch back and forth. Now that doesn't normally happen. Because normally, Daniel has his own user account, I have my own user account, so we don't bump heads. Never the twain shall meet, right? But I might need some different profile based on applications that I'm running, right? I might have a certain color scheme that works well with one application, and doesn't work well with another. So I can come in, and I can create those. But a lot of times, we'll just have one. You can use the Default one if you want, and you can edit it to customize it how you want. Now I went into the Preferences screen. And if I choose Edit, it's going to take me to the Profile Preferences. That's the same as if I've gone back out here and gone to Edit and Profile Preferences. The difference is this immediately takes me to the Don's Custom profile. Versus going to the regular Preferences screen, I can pick which profile I want to edit if I have more than one profile. So that's the only difference. If I just wanna modify the profile I'm currently in, I can go to Edit, and Profile Preferences and jump right in there. And now we can jump in and start to customize things. Now I wanna show you some of the standard things that I customize, right? The first thing, just the very first thing that I do is go to a custom font, right? A lot of times the default font is set to Monospace 10. And a 10 pitch font on a high resolution monitor is very, very difficult to read. Now, I'm getting older. [LAUGH] Getting a little older each day, and it gets harder and harder for me to see. So I need a slightly bigger font. You might be young, you're 18, you're in high school, and you can read a microscopic font. And so you set the highest resolution font, good for you. Or you're Mike Rodrick. One of our other hosts, he always has tiny fonts, I don't understand it. But you can pick whatever font you want, and you can make that larger or smaller. You can actually choose from a number of different fonts. Maybe, I have seen people that like the ones that look like cursive or whatever. You can get all kinds of fancy-pants with this stuff, if you want. And you can load custom fonts too, if you really wanna go crazy. Those look good, I like that. Some don't work as well as others. [LAUGH] So you might not want those. We're not going to pick the Wingdings font or whatever, or Webdings. But you can customize this to be pleasing to you. If you are going to be working in this terminal a lot, you want it to be something that makes sense. But for me it's normally the font size that impacts me the most, and I can see that right down here. I've got mine at a 16 pitch, you might need to go even larger. If you're on a super high resolution monitor, you may want it at a 24 or something higher like that. But usually, 10 or 11 is the default and for me that's just too small. So we can customize that. After that, there's other things we can customize like the Initial terminal size, okay. Now, the default here, let's do this. Let me get out of this one. And I'm gonna go and I'm gonna switch, let me go into my Preferences and Profiles, all right? And I'm gonna create a new Profile here, right? And this is just at the default, so see how it's Monospace 12, slightly off on that. But the initial terminal size is 80 and 24, right? So that's kind of the default settings here for this Unnamed profile that I've created. So I'm going to take that profile, and so we've got this Unnamed profile right there. And I'm going to switch my terminal to use that. Now, you probably noticed the option where I can pick the default profile that's going to be used. And right now it's going to default to Don's Custom. So I'm gonna choose Unnamed, and the reason I'm doing that is I want it to just launch when I first launch. We can always switch when we launch a new terminal, when we open one from an existing terminal. But when you open a new one it takes that default value. And so here's the default terminal. And you'll see kind of my point, it's really small, it's hard to read. It's not necessarily the ideal situation. It's also not very wide, okay? Now, I can come in and hit Ctrl+Shift+Plus and make it bigger, okay? But that's a one time thing. If I come up here and say File ; Open Terminal, until I actually get choices now between which Profile I wanna use. I can open another one unnamed and see how the new one comes back small. It even does that with tabs, which is super annoying. [LAUGH] [LAUGH] If I go to open a tab and I do it unnamed, see how this tab is small, and then this tab is big? As I switch tabs, it's changing. That's pretty annoying, too. I feel like I'm on psychedelics watching that. What's going on here? [LAUGH] It's usability, right? We have to get in here and kind of customize this to meet our needs, right? That's just really the whole point of having these profiles is being able to set them to whatever it is that our system needs. So if I go back into my preferences, I can change that default profile back to mine. And I can edit it. But I like to modify the font size, and then the width of the terminal. The terminal itself will default to 80 by 24, cuz that's what the old dummy terminals used. The mainframe terminals I mentioned, they were 80 characters wide and 24 characters or lines tall. That can be kind of small on our new widescreen monitors. Most people buy 16 by 9 monitors these days. So it makes sense to make the terminal a little wider. i usually go 100 by 24, like that, is kinda my default. A few other things you can tweak, the terminal bell. The terminal bell is super annoying. [LAUGH] Any time, maybe you backspace to delete characters and there's no more characters, every time you hit backspace it goes ding, ding, ding. It gets annoying. Some people really like that, right? So we can leave that bell on or off. Mine's on, but I keep my laptop muted so it doesn't matter. But you might wanna disable that. You can specify a command. When you first launch the terminal, what does it do? Well, the default is it drops you to command prompt, and it sits there and it waits for you to do something. But if there's a command that you run every time you launch the terminal, you can come in here and tell it, hey, I want you to run a command. Maybe I don't want it to go to a regular terminal. Maybe I want it to go to something special, like tmux. Tmux is a special kind of terminal that's very much like Terminator. They'll let you slice up the screen, but it does it all with keyboard shortcuts, and it does it all in one session. It's kind of, it's almost borderline magic. [LAUGH] So I can say, hey, when I launch a shell, I want you to just go straight into tmux, don't go into Bash, or whatever my default shell happens to be. So you can override those values here. Normally, we don't do that, but you could do it. The colors? The colors are kinda fun. In the olden days, right, we just had white text on a black background. Or maybe the other way around. Black text on a white background. Or your favorite, black text on black background. [LAUGH] Yeah, yeah. It's always great. [LAUGH] The stealth shell, right? [LAUGH] But you can change it. You'll see like green on black, to get that true retro feel. [LAUGH] [INAUDIBLE] that, you'll really feel like a dummy terminal. You can do that. But all of these color settings can be overridden from within the terminal itself. And you'll see that pretty frequently when you're working with these terminals because things get colorized. When I pulled up my directory listing, different files had different colors. That's being determined by the shell that I'm using. So the terminal has a default color set, and that's really what you're picking here. And then the shell can override that at different places. And there's some default schemes that you can choose from. You'll see down here, mine's set to custom for some reason. I don't remember customizing it. But you can choose from some of these other default color schemes to pick whatever it is that you want and get things kind of set to your liking. The scrolling tab is kind of an important one for me. As you run commands, there's often times when commands will exceed the top row of your screen, it'll scroll off the screen. You need to be able to scroll back and see it. Some operating systems have that scroll back buffer set really small. If it's only set to 100 lines, and I do a yum update and there's more than 50 updates, it's gonna be more than 100 lines, I'm gonna lose messages that were at the top. Okay, that's how it works. So I need to have scrollback buffer that's big enough to let me scroll back to see messages. Now you don't want to go too big, because where does that scrollback buffer get stored? It's stored in RAM. So the bigger your scrollback buffer, the more RAM you're eating up. Now this day and age, we usually have tons of RAM, so it's not that big of a deal. But you don't wanna set this to be millions of lines stored in RAM. So 10,000 here is actually a really good number, that's a huge number of lines to scroll back and see, but without consuming too much memory. But you might wanna tweak that and change it, make it smaller, make it bigger. You certainly have that option. Well, Don, I know a lot of people like to, and with these newer terminals, they have the ability to increase the transparency of the terminal. Very cool stuff, kind of an effect thing. But that's kind of a personal thing, right? It is, I hate it. Where is that, is that under colors? Yeah, I've noticed you're not a huge fan. No, I absolutely hate it. Here it is, transparent background. If you watch a hacker movie- [LAUGH] Any hacker movie. Any hacker movie, they love the transparent terminals. I don't know why. It's like, I've got this readable terminal, let's make it less readable. The transparency, right, so if I turn that on, this transparent background, what it does is it takes the background of your terminal and it makes it read kind of see through it. And the idea behind that is if I have multiple terminals, right? So let me close out of this. I'm gonna open up a new terminal, right? And I'm in here and I'm doing work, well, see how you can see my wallpaper through the terminal now? You can see the big 7. I see the Linux. The word Linux up there, yeah. I'm seeing through my terminal. And if I open up another terminal window, see how I can see the old terminal through my new terminal? It gets super confusing, doesn't it? [LAUGH] Well, I think the idea was if I needed some information from the other terminal I could see it while I'm in here. But in practice what happens is you end up with just overlapping stuff. And it becomes really confusing and difficult to read. And this is just terminal windows, right? Maybe I've got a webpage open, and so I'm browsing to ITProTV, and so I'm browsing the Internet, there we go. And so I fire open my terminals, and I can kind of see through them. And I've got the transparency set at 50%. That's probably a little too aggressive here. If we were to tweak that down a bit, it creates a kind of artistic effect that some people like. I absolutely hate it. [LAUGH] But some people, boy, they just love that stuff. So if I take that transparent background, and let me ratchet it down to a more reasonable level, right? Now you can still sort of see the web page behind it, but it's not totally in the way. You can get that and increase a nice little artistic effect. There are some distros that have this set by default. Again, I usually just come in and disable that transparent background. Now I can read everything nice and neat. That's the way that I like it. Now Don, I know we're running super short on time, but I was wondering if you could just touch on some of the, or one of the major things that we do inside of our computing experience, which is copy, cut, or paste. Okay. Can we do this in the terminal and can we go from like your web browser to the terminal? Yeah, you can, but it does get a little bit tricky, right? So normally, when you're in an application, like if I'm in a web browser back here. And I wanna copy Enjoy IT Training Courses, so I wanna copy this little marketing slogan. I can take that and I can hit Ctrl+C on my keyboard and that copies. And then when I go up here, I can hit Ctrl+V and it pastes, right? Well, that works. It even works in a lot of terminals, but it doesn't work in every terminal. And, the main reason is that Ctrl+C is usually a breaking command. It's how you abort a command. So for example, if I start pinging some server, It's gonna ping, and it's gonna ping forever, until I hit Ctrl+C. Ctrl+C tells it to stop, right? Ctrl+C doesn't tell it to copy, it tells it to stop. And so if I highlight some text, like with my mouse here, I'll highlight some text, and hit Ctrl+C, it didn't copy. And if I do Ctrl+V, it doesn't do much of anything, right? So those traditional copy and paste don't quite work the way that you might expect them to. Now you can always use your mouse, right, which is a little bit anti-Unix. But we're not in Unix, right, we're in Linux. I can highlight with the mouse and I can right-click and I can choose copy, and then I can right-click and I can choose paste. And there we go, it worked, right? But a lot of terminals will rematch shortcuts to something that actually does work inside of a terminal. Whichever terminal you pick, you'll need to look at what its defaults are, right? Back up here and edit and preferences. We had the shortcuts and right here is where I could define a number of shortcuts including copy and paste. And if you take a look at the ones that are in here, it's got Shift+Ctrl+C, Shift+Ctrl+V. So instead of just hitting Ctrl+C I hit shift as well and that's how it avoids sending the breaking command, right? So that'll make sure that it does that and ensures that I can copy it. So now, I could come in and I could highlight something. And I could hit, I don't usually do Shift+Ctrl, I usually do Ctrl+Shift. But Ctrl+Shift+C to copy and then Ctrl+Shift+V and there I'm pasting what I highlighted, all right? Now in the GNOME Terminal, that's the way you do it. That's the shortcut that you remember. In some terminals though they do what's called copy on highlight, where if you just highlight something the moment you let go off your mouse it copies it into the clipboard. And the moment you right click it immediately paste that data, right? The GNOME Terminal doesn't do that but there are terminals that do. And they usually just call that copy on click or copy on highlight. So as you dig through the options on your terminal, you may find something that indicates that. And I don't think I have that option here at all. If we take a look at even Shortcuts, O'm pretty sure GNOME Terminal doesn't support that. But like I said, yours might and if you dig through your options you may find it and see where you can turn that on or customize that option. So that's another way we might do that. But again, it does vary a bit from terminal to terminal. All right. Well Don, we've run out of time with this episode. I know you have more to go, jumping into the shells area or the arena, should I say. Yeah. But looks like we'll have to wait for part two on that. We do thank you for joining today. Is there anything you'd like to part our guests with before we go? I certainly didn't get to every terminal in the world, there's hundreds of them, and you might have a favourite one. I know I left out Konsole, the one from KDE. KDE's console has a neat little bookmark feature, where you can bookmark folders as you navigate your file system, you can bookmark location. And so when you launch that console, you can say go to this bookmark and it jumps right to that location on the file system. Very nice. It's a neat feature. All of those terminals, they have bright shiny spots that make them great to use. They usually have a couple of cons that make them not so great. You just gotta find the one that's perfect for you and it's trial and error. Usually they're very small so it's easy to install a bunch of them. I probably have five different terminals installed here. Just take a look at what you've got and find out what one you like and just know that it's pretty easy to move to another one if you chose to. That's right. It never hurts to test drive something, right? You're not locked into it. You don't like it, you delete it, and you move on to the next thing. Don, thanks for joining us today. We appreciate your expertise on this and imparting that into us. But as I've said, we're out of time for this episode. Definitely come back for part two as we look into shells. But as for this episode and we are gonna go ahead and sign off for ITProTV. I've been your host Daniel Lawry. And I'm Don Pezet. And we'll see you next time. [MUSIC] Thank you for watching ITProTV.

Learning Style

On Demand

Length of course

9h 12m
20 Episodes

Here are the topics we'll cover

  • Getting Started with the CLI
  • Basic Shell Commands
  • Advanced Shell Commands
  • Shell Environments
  • Installing Software
  • Editing Files
Learning Options

Options for this course

Train your team
Stay ahead of the curve and future-proof your business with training programs designed for you.
Channel & Reseller
Transform your experience and integrate with our unique evolving library of Audit, Cybersecurity, and Information Technology courses.
Individual learners
Learn at your own pace and get your certification training.