We are here with the Basic Linux Commands You Should Know. So what are the codes that every Linux user should know? Here are the details you wonder!
Basic Linux Commands You Should Know – If you have Linux installed on your computer, there are some basic codes you should know for a more enjoyable experience. We have compiled these codes together with their explanations for you. Therefore, we strongly recommend that you take a look at this guide.
Basic Linux Commands You Must Know
Here are the basic linux commands you should definitely know!
The ls command is used to list contents, namely files and folders, in the current working directory.
You can create a new folder with this command. Example usage; In the form of mkdir folder.
Using this command, which is short for Print Working Directory, you can use it to find out where you are when navigating Linux directories.
You can use it to change the directory you are in.
- You can access the root directory with the cd / command.
- You can access the home directory with cd.
- With cd .. you can access the upper folder.
- You can return to the previous folder with cd-.
You can find the full path of a folder you want to go to using the cd command: cd / var / www / folder / request
The rm command, which is short for remove, is used to delete a file, as its name suggests.
You can use the rmdir command associated with the rm command above to delete an empty folder.
You can use the cp command to make a copy of a file.
- The command “cp is okay volcano” creates a copy of the volcano file and gives this copy the name “complete”.
- If you write the command “cp -r is tamindir volcano”, it copies the tamindir folder and gives it the name volcano.
You can use this command both to move files and to rename files.
You can use it to view the contents of a file. Example usage; cat filename.
Displays the last part of the file you specified.
When you use it as “tail archive”, it will display the last 10 lines of the archive file.
You can use it to filter while viewing files. You can use it as “less filename”.
You can search for patterns consisting of characters within one or more files.
You can use it to find files. Example: find folder -name filename or find folder -iname filename
You can use it to create compressed archive files. For example; tar –xvf like arsiv.tar.
Compresses the file you specify and converts it to .gz format. Sample; gzip -9 filename
You can use it to extract compressed files to the folder you specify.
- unzip arsiv.zip –d directory
You can see the list of shell commands. You can get help about the relevant command by using the help command name.
Shows a one-line description for a command.
Using this command, you can access the usage details of any command. For example; When you enter the man ls command, you can see how the ls command is used.
You can use it to log out.
It sends ping packets to a remote server and reports the returned packets. You can use it as a ping host.
The “Who” command shows the list of users currently logged on to the system.
With this command, which means Super User, you can get full authorized user access in the system. While you can perform all your operations as root with the “su -” command, it allows you to perform only that command as root with the “su –c” command.
You can also use this command to get information about your operating system.
- uname –r: Displays the kernel version.
- uname –s: Displays the system name.
- uname –v: Displays the version of the operating system.
- uname –a: Displays all the above commands and other uname commands.
It shows the memory usage on your computer.
Displays the used and available space on the hard drive and other storage devices in the system.
Used to show the properties of processes
Shows the applications running on the system.
As the name suggests, you can use it to shut down the system. You can also restart it with the command “shutdown –r now”.