15 Useful Linux Commands Every Linux User Needs | Learning Terminal Part 1
HTML-код
- Опубликовано: 18 янв 2019
- In this video, I go over 15 Useful Linux Commands Every Linux User Needs in my Learning Terminal Series. 15 Commands are explained in this video of part 1 and will be introducing EVEN MORE commands in part 2. However, before that, you have to know these 15 as they are vital to everyday life in Linux Terminal.
Tab completion
sudo
su
exit
ls
more
cd
mkdir
rm -Rf
mv source destination
cp source destination
./ (execute commands)
chmod +x (change permissions)
chown user:group (change ownership)
--help (shows help)
man command (shows manual)
ProTip: Install most and export PAGER=most for more color .
►► Digital Downloads ➜ www.cttstore.com
►► Reddit ➜ / christitustech
►► Titus Tech Talk ➜ / titustechtalk
►► Twitch ➜ / christitustech - Наука
U really r the only linux youtuber who speak human languaje and even i understood u in every video
Actually, pwd = print working directory. ;)
I learned it as 'present working directory', but whatever.
Mista warm qum man. miss you.
tmux does so much more than what you implied it does. Window splitting is fun and all but tmux also allows you to do things like save your session and then reload it later or load it over ssh, etc.
This information is invaluable. I’m glad you present it in such a clear and direct way. Most RUclips videos covering the most important aspects of Linux, like basic command line functionality, are unwatchable. Your videos are not only watchable but enjoyable. Thank you!
Many people who do tutorials seem to assume you already know a lot of things or don't think that a new user might not know. I've seen that it many other vids too.
Good video! So pumped on learning that cmatrix command lol
9:13 helping you out . "pwd" stands for Print Working Directory, for those who want to know what it stands for.
Really, REALLY, good video, sir.
😊
Great explanation, looking forward to part 2
Great video, loved the "most" command since I constantly read man pages, i went straight ahead and updated my .bashrc, thanks man, i really appreciate your advice.
Nicely done
watching your videos is becoming daily routine for me
keep up the good work
Thanks for this series. Have just been using Terminal as needed so far, but this series can help me understand how to know what I can use the terminal for. I still like to use the GUI when things can be done that way. If I can Rsync to my other machines that would be great, made a backup a couple days ago.
Loving your videos. Thanks!
thanks for the double tab completion. didn't know double
you have a lot of other awesome videos I'm very much looking forward to watching. I'll tickle the algorithm as I go.
Thanks so much. Your video was quite instructive and valuable for me. Appreciate your hard work! :)
Thanks! Very helpful!
great class for today Linux's home schooling. Thanks
Thanks. I learned something :-)
MORE TIPS:
Create command _aliases_ (shortcuts to more complex commands) in your ~/.bashrc file (or ~/.bash_aliases depending on your setup; .bashrc calls it in ubuntu, though either file will work), e.g.:
*alias ll='ls -l'*
*alias la='ls -al'*
(you have to restart your shell for it to take effect)
*cd -*
The '-' (dash) argument takes you back to wherever you were before you cd'd into the current directory. Typing it again takes you back (forward, i.e. you flip-flop between 2 dirs)
*mv* also _renames_ files, in addition to moving (i.e. you move the file onto itself with different name)
Standard way to *exit* something like 'more' (man, less, ...) is *q* or *Ctrl+c* which works for most shell programs (Shift+z z doesn't work in gnome terminal / ubuntu)
If you want 'most' to always automatically be your pager, also put the following in ~/.bashrc:
*export PAGER=most*
The *info* command gives further documentation on a command, in addition to 'man'
To _execute your shell scripts from anywhere_ (incl. tab-completion!), make sure your scripts directory is in your PATH. Ubuntu sets your PATH in ~/.profile file (or ~/.bash_profile if you've created one), and automatically adds your ~/bin/ dir if it exists (*). Calling scripts this way does away with leading ~/path/.../... and './' - you just type the script-name like any other command (you can also provide arguments to your scripts, $1, $2, ...).
fourdotsYT use source if you don't want to restart shell. Put aliases in .bashrc and then do "source .bashrc"
I started on nano, then used VIM. Now use Emacs and love it!
thank you for the instruction. I'm brand new to Linux I know now much of what I need to find my way thank you again.
Nice! This is very useful for beginners. I wish this video existed back when I was starting to use the Linux terminal.
By the way, you can also use Shift+PageUp and Shift+PageDown to scroll up and down the terminal. It even works in an actual fullscreen (TTY) terminal.
Edit: Turns out it only works in actual TTY terminals.
I never found that using the terminal was faster than using graphical interfaces, but i do think its a lot of fun to use the terminal. It is so enjoying once i figure something hard out and then manage to fix whatever issue i had, its so much fun! Even tho using terminal is not that fast for me, i think it will be very much effective once i memorize the commands i use the most though, so i dont have to think a couple of seconds about what they were!
Yeah... You're likely a Visual Learner like me... My spatial intelligence is very rapid so I prefer the way a Graphic User Interface works. However, the terminal is very satisfying. It offers a level of precision, with feedback that makes problem solving even more fun...
Thanks for the video pal!
A useful thing when running a terminal - hit CTRL-r and type a few characters, it'll search your bash history for a match.
First command on any new install?
echo cmatrix >> ~/.bashrc
Gotta look like a h4x0r when you go into the shell ;-)
I feel like these daily linux vids are spoiling us geeks, ^_^ ty, you rock. Hack until it hurts
Thanks for an awesome video!
this video helped me a lot! by the way can you include helpful print links or other video links in the description? i find it really great if channels do this because it's much easier for some people to navigate links much faster. thank you so much!
The cat command actually gets its name from 'concatenate'. It can also be used to concatenate two or more files.
i prefer catalogue , shows the text, joining 2 files needs the >>
A few things maybe to consider adding next time.
First remove is a very powerful command. You can break your system using it and there's no take backs.
Second instead of More, I think the less command is a bit better choice as I believe you can scroll up and down at your leisure.
Third, you forgot the most powerful command of all... Lolcat. You did show cmatrix which is high up the list though.
@Crebs Park sorry not sure via RUclips comments. I'd recommend checking out the Linux mint forums. They'll have better ideas than I do on how to make it boot again.
I mean the jokes about it are so old they're not even amusing anymore.
To really break your system you need to rm as super user and use force. If you are trying to remove / and really destroy your system, you need to do "rm -rf --no-preserve-root" (Don't do this) in most cases, just "rm -rf /" will warn you but yeah it is powerful, except that free and open source recovery utilities can easily get your data back if you haven't written over it.
Awesome content, I'm learning Linux to get a job as Linux admin/engineer
Agree with some of the other posts, nice video, easily understandable, not much like it on YT. tilde = tilda = till-der. if you use LESS instead of MORE you can use page-up and page-down, end & home keys, or arrow up/down for one line. NOTE that MORE is functionally identical to CPM/DOS versions of MORE, while "LESS is more" (and then some), they are both PAGER's, just like the MOST package installed, so you can pipe "| most" now too. (CAPS for clarity, use lowercase). PWD = path/print working directory.
I use custom scripts too: SDN (shut down now) = shutdown -hP now; RBN (re boot now) etc
on debian based I also use: SI (search installed [packages]) = dpkg -l | grep "$@"; SF (search for [package]) = dpkg --search "$@"
Alias more='less' ftw
Thanks and...more😎
Very good. I can not wait for the dangerous commands.
@Donald Mickunas Actually, it's marked on the drive with a special flag, so it CAN be recovered with the right software (preferably run in RAM during a liveCD/DVD/recovery session). But... I know what you meant. ;)
Very useful thank you !
A tutorial on chroot would be great. How to fix broken Linux install if you can't boot from it. By booting into Linux live environment with USB and then chrooting into the broken Linux distro installed on SSD or HDD and fixing whatever problem it is having that is preventing the installed distro from booting.
Awesome idea! I'll put this in the queue
The first rool of chroot club is don't tell noobs about chroot club. JK. Good idea.
The problem is when BIOS breaks, then you have a bigger problem.
chrooting always saves my Arch installations. I always forget something!
Great, now I now what ls is
Thank you
Thanks a lot for your efforts
Totally brilliant Chris I'm so glad you are doing the Linux Command Line mega thanks.
Also can you make a playlist for the Linux Command Line as that would help a lot also?
Yes, already setup a playlist series as I'm going to be making quite a few videos over this
Nice name. 😉 🗺
@@mitchelvalentino1569, many thanks :)
Thank you for this!
Hell yeah on terminator, i love being able to just slice up and create new windows, and shrink and expand them all from keyboard shortcuts. Makes stuff so damm fast
15:05 To explain why the "Operation not permitted": The current user (titus) is *not* part of the "users" group.
Use the "groups" command to find out what permissions you may assign. Note that it doesn't always make sense to use certain group for standard file permissions.
Nice series. Subbed.
I never used fish, always bash or zsh.
You can open multiple terminals on most os.. Thanks love ur content
Good video, surprised you didn't point out the up and down arrow keys to go back to your old commands.
Chris I think "~" (tilde) is pronounced "TILL-duh" and not "Tiddly."
Actually, it's a Spanish/Latin symbol pronounced "TEEL-day", but every programmer I've ever heard does pronounce it "TILL-duh" or "tilld"
@@joevining2603 I'm fine with "tiddly" --it's so very Ned Flanders and, lets be real, less boring than "tilde" I mean why does a pale Irish actress get a whole Unicode character named after her? Oh wait that's Tilda, oh well. I still like tiddly better. lol
Correct, Starwars-fan.
Lol thanks... I suck at English... And yes I'm American and English is the only language I speak.
No Worries! As Joe Vining ^^ said, it's not even English, so you're off the hook. Great vids - keep 'em coming!
"rm -Rf" is not required, use a lowercase r, also, I do not recommend using -f as it can ruin your system, only use it when you cant delete a directory and know what you are doing.
in any terminal , if you have screen installed first run it a s screen -t title , ctrl+a+d, goes out of screen but leaves it running , screen -list lists all open screens , screen -r reattaches a screen , ctrl+a+esc goes to scroll mode in screen , you can now use arrows pgup pgdown to scroll , screen is also handy for when you are working live on a machine but want to go home and continue , detach the screen (ctrl+a+d) go home ssh into the server and reattach the screen , and you get the terminal you were working on at work, with all the output visible that was produced in the mean time , if you forgot to detach a screen but you want to access it on a different location , you could attach to it without closing the remote session or you could do screen -D -RR wich detaches the remote screen and reatacces it locally no matter what , many distros also setup ls -l as just ll . , 3rd one if you find that you were running a command and needed root permissions instead of doing arrow up pressing home typing sudo , you can just type : sudo !! and it will run last command but with sudo typed in front of it. 4th : besides --help and man there is also info [command] in order to find more help :)
tidle??? And yeah, it's useful to know "./" means current directory and "../" means directory above and "../../" means 2 directories above, etc. And hopefully all know "/" means start from root of filesystem (e.g. "/etc"; "/home" to see all user folders).
I'm very curious what your thoughts on nu shell are? Thank you great video
I'm love Midnight Commander and Nano. In other hand vi was very useful on the very slow connections, but now is simple odd.
Someone needs to do a video like this for people who are already familiar with dos commands
Chris, did you ever try Tilix as a terminal? It's what I am currently trying but will try terminator too. Is going to be a hard choice, I think. I really like Tilix.
nice one man keep going
I always think in my head every time I use pwd "the path I walked" lol
Now that’s what I’ll be thinking
I first got Terminator because of this - now I use GNU Screen since I do a lot of stuff in Tty - plus I like to save my setups.
feels like a should watch this video everyday for a month to get everything
Excellent
You could also remove directories with rmdir or rm -d commands, forcing it is usually a last resort type of thing
How did you add the terminal preview on the file explorer? Is this a specific explorer or you can do that on Dolphin also?
With regards to exiting something like more when it hits [END], I have only ever used Q instead of shift z z. Also, some commands don't do --help, sometimes -h works, other times it might be /? .
Another suggestion that I haven’t seen anyone pointing out (maybe I just haven’t looked hard enough) is that:
When you run some command as normal user and it fails, and you realize “Shit, this needs sudo”, then just type “sudo !!”. It repeats the whole command with sudo without needing to call the command, get to the line start and type sudo.
Love these vids mate, still learning myself, just a questions when removing directories it seems there is an option of -r and -R what are the differences in the sensitivity if the case?
good video most helpful
I'm so used to screen, maybe I could change the key binding so I wouldn't need to learn a bunch of new key combos.
Thanks for the PAGER tip, now I can search those man pages.
If you're used to screen, and want to take advantage of tmux's features, I'd suggest byobu. byobu is a configuration layer for tmux (and screen), and one of the feature it can do is easily remap tmux key bindings so it's more similar to screen.
@@yvrelna
thanks, that looks cool
I like the cpu speed displayed
Thanks
You can just go home with cd also with no ~
@Donald Mickunas still good to know ~, even while not needed with cd, for using it in a path.
Hi Chris!
Is it possible to find files and at the same time list files with its size in human readable format?
I feel like im in over my head with some of this. Perhaps with some repetition I will feel mor at home with terminal. All I know is windows is the devils spawn. Mama said so.
mama was right :D
youll get there. just use it a while.
Fernabi aner I’ve had a relapse lol. I’m definitely going to put another hard drive in my home pc so I can easily go back and forth between linux and the os whos name shall not be mentioned. I’m definitely going to start using Linux for all my photo editing and video editing/animation
For the beginners, you can also just use "su" instead of "sudo su" and then you will also become root. Sometimes you have to because some distros like to lock certain commands/folders/files behind root.
@Donald Mickunas
That is what they invented the simple command exit for.
Speaking about, another n00b-tip, with exit you close the terminal too, but if you are su you just go to the user-rights again. If you are a fast typer then typing exit and pressing enter is as easy or easier than pressing alt+F4, I don't even consider using the mouse of something like that. :)
Yes, you shouldn't be root any longer than what is required to get something don which you want to get done. Maybe sometimes in Linux they limit the rights for the user a bit too much though. It is good that you can't edit/remove certain files with user-privileges but not allowing to read does not make it safer because then people have to switch to root while with only reading-privilege you can't do any harm anyway but as root you can if you are not careful or maybe someone else can while you are in root if there are vulnerabilities)
Having a true /root environment is useful in certain screen configuration troubleshooting scenarios, and for doing fsck on your /home partition (assuming it is a separate disk partition) without having to reboot your machine with a livecd. And I seem to have the bad luck top get into those situations, so I've learned to avoid sudo-only distros.
About that "sudo su" around 4:20 in... indeed redundant in this form. You can accomplish the same with "sudo -s" -- get a privileged shell if you know you will need to give several commands in a row for a given task. And indeed, you will stay in the user area and can pollute the place with inaccessible files as was shown in the video. More useful is "sudo su -" (with a minus behind). The minus to su asks for a login shell, so you'll find yourself in the /root area and it's as if you had logged in as root to begin with. For larger installation tasks it's often useful. (su - is the same as su -l). And su is not available to elevate privileges in all distros, so the "sudo su -" version is best.
Did you ever wonder why Linux can't just open a terminal and ask for an admin password when it needs an admin password? How many lines of code would that be? What do you think? I bet it's less than 100. So after almost 30 years nobody got around to write those 100 lines of code...
I'm looking for the basics, and you jump to terminal multiplexing. Would really like to know the basics like how to increase the size of the fonts.
Thanks. Just got a pi400. Never touched linx. Wish me luck
nice
For the more command, why not just hit 'q' to exit instead of the 'ZZ'. vi uses the ZZ. Also, I prefer less instead of more so I can scroll up and down.
thx man for the "most" package never used it:/
I think you mispronounced tilde at 9:45 and said tidle instead 😜
thanks for the video though
hi , i think im the most beginer with the linux from all the people who commented ,
but I'm still curious if these codes i can use them in other versions of linux like Zorin or Garuda
You need to structure your videos a bit better.
you've taught 'sudo rm' before teaching anyone what 'rm' is, and demonstating it with sudo is just bad if they have no experience with root.
and after that you taught people what cd does(9 minutes later). Surely cd, mv, cp are the first thing to teach?
Also your blinking steampath link is what I was looking at even when I knew it had nothing to do with what you was showing me, so that could be a little distracting for newbies.
how to make Terminator main terminal? what I mean by that is when I open folder, click right mouse buton and click "open in terminal" so it will open the folder with Terminator terminal (no matter I do it always open with default one)
🙏 see this lol Will this playlist help me use my steam deck desktop?
very good , linux command is good very support signal cellular company
Newbie here. Was your first example of using rm used to remove your root directory? Wouldn't that destroy your Linux installation? I know I'm missing something and making a dumb noob mistake.
Is DXVK performs much worse than DX11 normal, RX580 seems to be able to run Resident Evil 2 "1-Shot Demo" at 60fps on Windows 10, but I can only run it at 4Xfps.
Shift ZZ? interesting. I usually just press Q. you also don't need to include the "~" in "cd ~" to get to home directory. just simply type cd and hit enter. same thing.
I'm running Ubuntu on my Virtual Box. can I still implement this "pacman" feature to make the script look colourful. (export PAGER=most) did not work on my terminal
Does Terminator give you any advantage that tmux in any terminal wouldn't?
It's more geared for a GUI with themes and tmux is great for servers without a GUI.
_Viva la vida VT102_ ...serial dialup console ftw!
no.
tmux has more advantages than just multiplexing, it lets you save sessions and reload them for example
@@rwbimbie5854 I used to use that with a 300 baud acoustic modem. Was a hazeltine 1500.
Actually, "ls -a" works too, unless the "l" at the end adds another option I don't know about...
So Chris, why are you using "more" rather than "less"? "more" seems like a bad habit left over from DOS ;o) Also, what's with the "ZZ"? Both "more" and "less" use a single "q" to quit. In closing, "less" is more powerful than "more" ;o)
So what you are saying is "less is more" lol 😀 I find ZZ easier than q but that might be vim leaking over into my opinion.
I had the SAME thought.. lol. ANd then I was like. but ya know.. I couldn't tell you the difference between them w/o looking it up. lol
let's get him on Vim. B/c ... I mean. Chris is one of the KoolKids now (welcome, welcome, glad to have ya Chris) ... it's TIME.
Seems to me he's actually using `less` even if he writes `more`, because ordinary `more` will finish at the end automatically (once you scroll down below last line of output), only `less` waits for 'q', at least on my box. Then again on my box only `more` leaves output as part of my terminal tty, `less` does "return" after 'q' back to original screen I had before executing the command, while Chris gets his output visible after ZZ, so I have it clearly configured completely different.
But if this is for people not used to terminal, then 'q' instead of 'ZZ' is no-brainer. Nobody will remember ZZ, just like nobody knows how to exit `vi` (except killing it from other terminal).
About "pipe", @Chris: explaining what pipe actually does and how can one chain multiple commands ... is IMO a must toward people new to terminal, but then again I have no idea how to introduce that to them in a way they would listen and actually comprehend (plus the , >> re-routing and "out" vs "err" channels, etc... ok, I'm drifting off into marginal details, but actually somewhat explaining what pipe does is probably essential.. and some nice example how it can be used to chain multiple commands, like `ls -alR ~/ | grep jpg | grep sky` if you are too lazy to create single regexp, etc.. ... oh, did I said "regexp"? :D ok, now I'm really drifting way off from ordinary users :/ ... than again, it's sad to see them sometimes doing trivial tasks in insanely mundane and manual labour way, where 3-4 unix tools would do it).
EDIT: maybe also that... pointing out the UNIX philosophy of small one-task focused tools..
The proper phrase: "less is more only less" :)
That's why I have locks on my files, how do I get rid of those locks?
Who still uses *more* instead of *less*? more was made for paper TTYs. less is the same but scroll backwards too. (and can search "vi style" with / ) ;-)
I am a new linux user and currently using Ubuntu, I am far from a computer newbie but I am unsure what distribution I should be using, any comments?
Please what's the option that print the author of files?
screen is older than tmux and it was very popular back then
Bro I just installed manjaro, previously I was using Ubuntu. Went to steam to install counter strike free version its showing 8gb ll be downloaded. How can the basic game may be this big
"sudo !!" Runs the last command again as root much quicker way for when we forget to add it
This comment changed my life...
Put "export PAGER=most" that in your ~/.bashrc file and do "source ~/.bashrc" to always have it (Unless you are root in which case put it it /root/.bashrc)
Hi
I’ve installed kali linux on macbook pro late 2016
So in the final steps grub loader didn’t install
The biggest problem I had moving to Linux was the lack of direct equivalency between using DOS's DIR command to search and Linux's FIND. Even after reading FIND's MAN page (like most MAN pages, perfectly accurate and utterly useless for one's actual question), my attempts to invoke FIND resulted in either null result or spooling out the entire file contents of / with no filtering. I gave up and only search using gui tools like catfish now.
Most people only memorise a few use cases when using "find".
The most common is:
find -(object) filename
The equivalent to dir /s whatever.* is:
find ./ -name "whatever.*"
Want to limit the search to directories?
find ./ -type d -name "whatever.*"
Always use double quotes when using wildcards.
As an alternate if you don't remember the switches, you can use grep to do the filtering:
find ./ | grep whatever
Hackerman!!! i love the American accent