Top 20 Commands Every Linux User MUST KNOW

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today I'll be sharing with you 20 commands that will allow you to get a power-packed experience out of linux linux desktops come built evolved desktop environments now and there's less need than ever to use the terminal but the terminal is still the most powerful interface for linux cyber security hacking forensics and other forms of advanced computing require that you have a sound knowledge of linux commands terminal opens up a whole new world of infinite possibilities during my earlier days I always refrained from using the terminal I loved the GUI but later on as I started using the terminal more often my knowledge grew and I started enjoying Linux in a way I never did before the terminal is where you see the real power of Linux the terminal allows you to do things that are not even possible with a graphical interface in this video we'll be going through 20 commands that every Linux user must know and how to use those commands in real-life situations this is a beginner friendly video so it will also help you get started with the terminal if you are new to all this this is the next X let's do this starting off we have list on number 20 LS or list is a simple but a very useful command that displays the content of a particular folder or directory but that's not all LS can be used to get advanced info such as to check if your friend change anything in your personal folders open up a terminal and type in LS and hit enter you can see that the contents of your home directory are displayed here you can open a terminal in some other location and try out the same command you can see hidden files and folders that are not visible in the File Explorer by typing in LS space - a LS space hyphen C will sort and display folders in an order in which they were modified particularly useful when you lend your laptop if you play around with Linux knowing how to use this command will be very useful in case you break something and the graphical interface fails to start we need a way to navigate around different folders just like we are doing here in the file manager for this we will be using the CD command which of course stands for change directory right into it type CD and type in the name of the folder you want to open type in the first few letters and press the tab button to autofill the entire name hit enter to move out of a folder back to a level up type in CD leave a space and type in two dots and hit enter there are two ways of using the CD command you can either use the relative addressing which is the above method where you type in where you want to go from where you are or you can type in the full address of a location directly from route this kind of addressing begins with a slash and then you type in where exactly a particular folder is this is known as absolute addressing it's like the postal address whereas the first one is where you're helping someone to get to a point from where you are make sure to use the tab button to autofill the file or folder names next up will be creating a directory or folder browse to the location where you want to create a folder then open up a terminal and type in mkdir space and the name of the folder you want hit enter you can see that a new folder or directory is created here to delete a folder we are using rmdir followed by the folder name this command is rather limited and it did its only completely empty directories to delete directories with all the sub directories and the files use RM space hyphen RF space and the directory name you want to delete so yeah normally to delete stuff you can use RM RF just be careful with this command o absolute address is like the postal address of a directory it's unique and you can get rid from anywhere it also tells you where exactly the terminal is open in the file system to see the absolute address of the working directory or folder type in PWD which stands for print working directory it's a simple and informative command everything comes with a manual so do Linux commands Linux commands are extremely malleable what I mean by that is you can use these commands in many ways and this allows you to customize commands to suit the need at hand man command opens up these manuals type in man and then the command name you have a brief description what the commanders how to use the command and various options that the particular command supports when you run some commands in the terminal the screen real estate starts filling up with data and it can all get jam-packed with text here so to clear all the mess away you can use the clear command type in clear hit enter that's easy to remember next up we'll be seeing how to copy a file from one to another this is very important because when dealing with operating system files you need to use this command itself as copy pasting protected files using the file manager will not be permitted the CP command copies and pastes files and folders to copy a file open a terminal in the folder where the file that you want to copy YZ and then type CP space and put in the name of file you want to copy then leave a space and type in the location you want the file to be copied to hit enter you can even use absolute addressing to copy a folder you follow the same structure but you add - AV are after CP and before the folder name you want to copy CP command is of great use when you are repairing or configuring your Linux computer to move files we use MV command it encompasses would cut and paste it's usage is as follows type MV in a terminal leave a space and type in the name of the file you want to move then leave a space and put in the destination of the file you can see the file being Moody as soon as you hit Enter you can use either absolute addressing or just the relative addressing you can even move all the contents of a directory using this command cat command displays the content of a text file right then and there in the terminal itself it's a much faster and safer way of opening text files for read-only purposes not many days ago I was trying to repair my server configuration file by comparing it side by side with the original backup both opened in the gedit text editor and I edited the original backup by mistake and saved it that was three hours of headache I pulled on myself so using the cat command you can quickly peek into text files without accidentally altering them just type in cat followed by the file you want to open cat come on can also create edit and do so much more with text files using cat command if you open a small text file that's okay but if you open a large file with more text everything is going to be dumped on the terminal in one go this is not OK for humans humans need larger text data to be presented in smaller chunks in a scrollable fashion so we used the less command type in the cat command after the command put in our pipeline which is used to combine two commands together and type in less and hit enter use the arrow keys to scroll then you can press Q to exit the reader mode the terminal 2 remains clean and organized by using the list command lest is not limited to be used with just cat but it can be used with any command where you expect to get a large amount of data back on your terminal grep is a very powerful pattern search of command available in Linux so its basic function is to search for a word or a string in a file but various options can be used with grep to make it more suited for particular problems at hand like searching for case sensitive patterns searching for say tenth occurrence of a word in a file grep can also search entire folders containing any number of text files for a word in a single command I highly suggest playing around with this command if you want to get into Linux shell scripting so for basic usage open a terminal in the file location type in grep the word you want to search for space and the name of the file enter here you go this is just the basic usage grip can be customized extensively using options the history command chronologically lists out all the commands that have been run on the terminal rather self-explanatory isn't it a neat trick to remember you can just note down or remember the command numbers from here and you can run that command again by typing in an exclamation mark followed by the command number the numbers don't change so these can be long term shortcuts to this works without running the history command - if you can remember the number to clear the history just run history - C PS stands for process status and this command gives you an overview of all the processes running on your PC and information about them the command is quite useful especially if you have an interest in the working of Linux based operating systems PS has many options the one that gives you a detailed yet comprehendible amount of info on running processes is PS space - aux this shows a large list at you so use it with the less command we saw earlier you can see the owner of the process then we have the process identification number or the PID this number is unique for a process and has a significance we'll see more about you till later on then we have CPU and memory usage in percentage whenever your PC is lagging or is unresponsive you can quickly run this command and find out which application causing the lag by noticing an unusually high amount of CPU or RAM consumption here then we can choose to kill the process quick tip run top instead of PS to get an interactive status of processes in descending order based on CPU usage once we'll identify the culprit process that is causing the system unresponsiveness by using up too much CPU or memory we can kill it using the kill command I know not-so-subtle now consider the gedit text editor is giving me an application not responding message then I open up a terminal and I get the PID off gedit as shown in the last section then I copy the PID and use it to kill get it type in kill space and paste the PID enter be careful with this command as you might lose unsaved work if you kill some applications this is not the same as closing an application but a strictly address you close by the operating system fast WD is a command that you can use to change your PC password it also guides you to create a password that is secure enough by checking your password and giving you inputs regarding if you need to make it more secure it outright rejects simple common used passwords and even cross checks if your new password is in any way similar to the password severe used earlier all you need to do is type in PA sswd and run it follow through only buzz was that a strong will be accepted you can close the terminal to retain the old password to shut down your computer through the terminal we use well the shutdown command and there are many Advanced Options you can use here to shutdown the computer after some time useful when you have downloads renderings or other processes running on your computer you can use shutdown space hyphen T and time in seconds so here the computer shutdowns after 300 seconds which is 5 minutes you can also type in the exact time you want the computer to shutdown by specifying the time in 24 hours format shutdown space now does an immediate shutdown shutdown space - are performs a reboot you can even use the command reboot to restart your computer Linux is a very secure system which strictly enforces permissions to protect the user as well as itself yes you heard me right Linux protects itself anybody cannot just go ahead and delete or modify files that are critical to the system but there are users called super users or root who have the absolute permission to do anything on the system see Linux does not allow anybody to install stuff on your computer when you are away but it allows you to install software doesn't it to bypass the restrictions of Linux you use sudo before the command you run using sudo you can install stuff make changes to the OS and even delete the system files it's always a good practice to double-check the commands you are about to run and understand what it does whenever there's sudo in the command especially for Linux newcomers who are copying commands from the internet W get is an amazing command-line utility that are always used basically W get is a file downloader to download files using W gate all you need to do is type in W gate and then paste the URL of the file W get is much better than the default downloader in your browser it's faster much more reliable I mean the Downloads rarely fail even on spotty connections W gate also provides pause and continued support for most downloads which don't allow pause and continue in browsers during downloads if you close the terminal the Downloads pause and continue when you read and the command although this might not work if the server prohibits pausing the transfer finally we have apt app is the package manager for Ubuntu and Ubuntu based Linux distros although it's perfectly fine to use the software Center using the app command gives you superior control over package management apt is a command that needs elevated privileges so we use sudo before apt firstly we have sudo apt update which fetches information regarding the latest updates to the software and such it also contains info about available software and their dependencies then we have sudo apt upgrade which upgrades all the software installed on the system to their newest versions you can install a software by sudo apt install and then the software name say VLC we uninstaller software by sudo apt remove and the software name then we have sudo apt Auto remove and what this does is it removes all the packages that are not needed dependencies that are left over after software and install and all the garbage stuff that you don't need you can run this command every couple months or so well that's it for today if you like this video do subscribe to my channel and also hit the bell icon if you'd like to see more intermediate and advanced it's terminal stuff do let me know in the comments below this is the next X see you in the next one
Info
Channel: Linux Tex
Views: 35,523
Rating: undefined out of 5
Keywords: linux, commands, terminal, basics, linux basics, hacking basics, cybersecurity, ubuntu, parrot, kali, kali linux, hacking, hack, how to, learn hacking, hacking with linux, 2019, cd, ls, passwd, root, sudo, how to use, mkdir, rmdir, rm -rf, man, clear, cp, mv, cat, less, grep, history, ps, kill, apt, wget, learn linux, how to use linux commands, tutorial, new comers, freshers, shell, scripting, linux tip, useful commands
Id: 6YUPw9Do3uQ
Channel Id: undefined
Length: 13min 24sec (804 seconds)
Published: Sat Sep 14 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.