Hi novicers, we meet again in a post that relates to something basic. In this post, I will discuss the basic terminal commands of an Open Source-based operating system or FREE, namely LINUX. Yes, Linux is one of the most popular operating systems besides Windows and MacOS for computer devices. Many of the technology practitioners use the LINUX operating system in their activities because LINUX is an operating system that is very easy to tamper with and modify the program as needed without having to think about a lot of costs, and that also causes Hackers and Crackers to like Linux so Linux is identical with something that smells of Cyber War.
Even so, sometimes for new users who are accustomed to using Windows or MacOS it is not uncommon to experience confusion when they first use Linux, although for now Linux has been very easy to use because it already has a User Interface that is as easy as Windows or MacOS. This is because Linux users generally prefer to do a command process using terminal commands rather than through a GUI, the reason is because commands via the CLI terminal are faster to process and save more time, especially in the condition that we do a command via remote.
Linux itself has many variants consisting of several major distributions such as Debian, Ubuntu, Fedora, etc. along with derivatives that have several different basic commands (each derivative usually follows basic commands such as its main distribution). Like Ubuntu, it uses the “apt” command to handle its package problems and Fedora uses the “yum” command to manage the package.
In general for other commands other than to command the package syntax and the writing is almost the same and sometimes even the same. So here are the various basic Linux terminal commands that beginners must know to make it easier to learn and get to know the Linux operating system, where all the basic commands work in almost all Linux variants. Okay, we just learn the basic commands:
The abbreviation of the word “manual”, is used to see the usefulness of the command (see the manual of a program). Examples like | $ man yum | will display the usage manual of the program in detail.
<command> – help
It’s almost as usable to man, but the results are more concise than using the man command. for example: “help nano”.
Run the program as a root user or super user. example: “sudo yum install nano”
Looking at the list of files & folders that have a directory at that time, for example “ls -al / var / lib” is used to see what is in the lib folder.
Enter the desired directory, for example like “cd /home” to make the home folder a directory at that time.
mkdir <folder name>
Make a folder in the working directory at that time. example: “mkdir novice”
Look at the working directory that was active at that time. Example: “pwd” the result is “/home/novice/tutorial”
Open the Vim text editor for editing text. example: “vim novice.txt”
cp <origin> <destination>
Copying files and folders, you can to that folder or to another folder. Like “cp / home/novice.php / var / www / html” will move the file novice.php to the html folder. Whereas if copying the folder and all its contents must use the “-r” option.
mv <origin> <destination>
Move files and folders to the folder or to another folder. Like “cp / home/novice.php / var / www / html” is used to move the file novice.php to the html folder.
Deleting files, you can also delete folders in certain directories. example: “rm notnot.txt”
find <file name>
Search for files in the hierarchy directory. Example of using “find -name novicearea.txt”
This basic Linux command is used to view a history of commands that have been used before in the terminal. If you want to find a specific command, you can use “history | grep yum” to find the name of the command that has been typed and contains the word yum snippet.
Seeing the contents of a file, you can also combine the contents of two files. For example “cat novicearea.txt novicearedata.txt”.
This command is used to display one line of text. You can also write a text into a file, for example like the following “echo” Novicearea “>> webtutorial.txt”. The command will write “Novicearea” into the file “webtutorial.txt”, if the file does not yet exist, it will automatically be created on your device.
Showing lines containing the same words according to the pattern you want, for example like “grep -i tutorial novicearea.txt, it will bring up a line containing the word” tutorial “in” novicearea.txt “.
Displays the number of rows, words, and bites on a file. example: “wc fileA.txt
Sort the results of reading the contents of the file or in other words sorting the contents of the file. example: “sort novicearea.txt”
Change the permissions on a file. For example, if you want to change the access rights of novicearea.txt to 777, use the command line “chmod 777 novicearea.txt”.
Change the owner and group of a file. For example if you want to change the ownership of novicearea.txt to belong to the user “abc” you can use the command “chown abc abc novicearea.txt”. The word “abc” refers to the user while “abc” behind refers to the group name.
Change the user ID, for example “su <user name>” or make the user at that time a super user.
This command is used to change the password of the user. Type “sudo passwd” to change the user’s password at that time, while “sudo passwd novice” is used to change the user’s password with the name “novice”.
This basic Linux command is used to display the current user that is being used and can also show anyone who is accessing our computer. example of “who” or “who -a”
Displays a snapshot of the current process. example: “ps” or “ps -aux”
Stop programs that are running using signal ID. Usually this command is added with the option “-9” when executing. For example, like “sudo kill -9 547”, 547 is the PID (Process ID) of the current process.
This is an archiving program or to collect several files into one file, with the extension “filename.tar”. This command also uses several options, for example, the “c” option for creating archives, the “v” option for verbose operations, while “f” for specifying file names. Make sure that the tarball package is installed, if not, then use the “yum install tar -y” command (for CentOS families). For example, to archive “tar cvf /home/archive.tar / home / novice”, and to uninstall files use the command “tar xvf /home/archive.tar”
The file compression tool becomes “, zip”, almost the same as using tar. example: zip novice.zip novice “. if you want to do recursively or all files in a folder then use the -r option” zip novice.zip novice -r ”
Extract / unpack the “.zip” file. example: “unzip novice.zip”
Access computers / servers remotely via the remote. Examples of commands that can be used such as “ssh <username> @ <ip>: <port for ssh>”.
Copying files from other hosts connected in one network. For example “scp <file> <user> @ <ip>: <destination folder>”
Displays a list of partitions on the device, usually using the “-l” option, for example “sudo fdisk -l”
Attach a filesystem to a large folder. So there is no need to make direct access to the filesystem. For example, use “sudo mount / dev / sda3 / mnt”. This command will make the contents of the / dev / sda3 partition accessible via / mnt.
Unlock the mount command, for example “umount / mnt” is used to disconnect the mount command in the / mnt folder.
Display file size recursively. example: “du -al”
Displays disk space usage on the filesystem. example: “df -al”
Displays disk space and its limits. example: “quota”
Run the restart command. example: “reboot -y”
Running the shutdown command, other governments can also use “system shutdown”.
Open Text Editor to edit text files. Example: “gedit novicearea.txt”
The program used as a file editor on KDE, some operating systems must first install. Its function is almost the same as Gedit.
Make a foreground process to run in the background.
fg <id program>
Make the background process a foreground process.
jobs <id program>
Display the name and ID of the background job.
Filter text in a file and replace it with new text. Example of its use “sed | | n / novice / area / r ‘novicearea.txt |”
This command is used to move text and process language.
Used to find or search for files. For some conditions you must install the “mlocate” package with the “yum install mlocate -y” command and do the “updatedb” command before you can use the locate function. Example: “locate novicearea.txt”
See the IP that is currently connected and what network devices are available. This command is quite familiar with Windows users, where the ifconfig command is also used to view existing network configurations. Example: “ifconfig”
Showing today’s date. Example: “date”
The command is used as a text editor that does not need to open a new window. Almost the same as Vi, but more humane and easier to use. But for some Linux variants, you must first install the package. how to install it with the command “yum install nano -y” (used for the CentOS variant). While for the use of nano itself is as follows “nano novicearea.txt”
See all the processes that are running, sorted from the biggest process. Its function is almost the same as a system monitor. Most Linux users who are already getting used to seeing the top look by adding a “htop” package that is more comfortable to see. To use the “top” command you don’t need to install it first, because it’s already installed by default. Unlike htop, you have to install it before you can use the “htop” command.
Clean the terminal window. So the contents of the terminal window will be empty, but if you scroll up then the command that was previously executed can still be seen. If you really want to delete it then use the “history -c” command
rpm -Uvh <package> .rpm / dpkg -i name <package> .deb name
rpm -Uvh <package> .rpm is useful for installing packages with the extension .rpm (Fedora, Centos, and similar variants). dpkg -i <package name. .deb is useful for installing packages with the extension “.deb”. Sometimes it can also use the “gdebi” program, but it must be installed.
Displays the kernel version used, the installation date, and the type of operating system architecture. example: “uname -a”
This is a sign used to describe a string used to give a brief description of one element. But this one function is rarely used and given to the lesson on Linux.
Those are some common Linux commands that are common to use and are very important for beginners to know. Basically, almost all commands for each Linux variant are almost the same, only adapted to their functions and needs. If you can’t memorize it or want to speed up the process of writing commands on the Linux terminal, you can use the “TAB” button function on your keyboard to enable the auto-complete feature. So from me, hopefully my post this time can help you to learn Linux better. If there are errors or shortcomings, or if you have suggestions please provide your comments and don’t forget to visit the website novicearea.com regularly to get better knowledge.