BASIC ORDER LINUX

  • Whatsapp
Keyboard in dark room, Close up button enter.

This time I will share basic Linux commands that are often used to do commands on the computer.

Enter the operating system (login)

Ex. Linux login: user01
Password:
in the example above the user logs in to a computer called linux.
To change the password, type
Ex. # passwd
and to exit linux, type
Ex. $ exit or logout

General Syntax of Linux Commands

All commands in Linux are case sensitive, meaning that between uppercase and lowercase letters have different meanings, for example ls will be considered different LS
In general, Linux commands have the following syntax: command [option …] [argument …]

option: is a choice that we can use to give certain results from a command

Argument: is something that will be processed by a command, for example file name or directory

Sign (…): indicates that both options and arguments can be more than one.

Basic Commands

Man command

The man command is a command to bring up online help, similar to the “help” command on MS-DOS operating systems. Suppose to display online help from the command ls use:
Ex. $ man ls –

Pwd command

The pwd command is used to find out which directory is now, for example:
[user @ localhost data] $ pwd
[user @ localhost data] $ / home / user / data

Cd command

cd command is used to move to a particular directory. Similar to the cd command on MS-DOS operating systems. If ‘cd’ is used without parameters, the result will point to the home directory, for example: [user @ localhost data] $ cd / usr / local / bin <enter>
[user @ localhost bin] $ pwd <enter>
[user @ localhost bin] $ / usr / local / bin

Ls command

The ls command is short for a list used to display the contents of a directory. This command is identical to the ‘dir’ command in MS-DOS. If ls is used without parameters, ls will display all the files and directories in the current directory. The ls command can also be used to display a list of files and directories under the directory that we specify. Using the ls command can also be accompanied by options. The following options can accompany the ls command:
-a displays all files or directories, including those beginning with a period (.) on a linux system, files that start with a point are considered hidden and will not be visible by the ls command without option -a
-F displays the slash (/) sign for a directory, an asterix (`) for executable files, a sign (@) for symbolic links, a sign (=) for sockets, a sign (%) for whiteout, and a vertical bar (|) for FIFO
-l displays files and directories in full view, which consists of file size, date, modification, owner, group, and attribute modes.
-R if there is a directory, the contents of the directory will also be displayed

Rm command

The rm command is used to delete files or directories, similar to the ‘del’ command in MS-DOS operating systems. To delete a file, use the following command: rm <file_name>

As for removing a directory and all its contents, use the following command: rm -r <name_ directory>

Ex. [student @ localhost student] $ ls-la
total 2
-rwxr-xr-x 1 student users 345 Jul 24 07:48 .bash_profile
-rw-rw-r– 1 student users Jul 22, 2007 7:52 try .txt
Ex. [student @ localhost student] $ rm coba.txt

Rmdir command

Identical to the “rd” command on MS-DOS operating systems
basically the same as the rm-r command, however
the rmdir command requires that the directory is empty
first (does not contain files or directories). Directory
non-empty ones cannot be deleted with the rmdir command,
but must use rm -r.

Ex. $ rmdir / home / studendt / data / public


Mkdir command

The mkdir command is used to create a new directory, identical to the ‘md’ command on the MS-DOS syntax operating system:

$ mkdir <new_direktory>

Ex. $ mkdir data

Cp command

The cp command is identical to the ‘copy’ command in MS-DOS. The cp command is used to copy a file or directory.

Ex. [student @ localhost student] $ ls-la

total 1
-rw-rw-r– 1 student users Jul 22, 2007 7:52 try .txt

[student @ localhost student] $ cp coba.txt coba1.txt
[student @ localhost student] $ ls -ls


total 2
-rw-rw-r– 1 student users Jul 22, 2007 7:52 try .txt
-rw-rw-r– 1 student users 22 Jul 28 03:42 try1.txt

Cp-R command

The cp-R command is used to copy a directory and all its contents, for example:

$ cp –R / home / student_ / data / backup

will copy the student directory under the / home directory and all contents into directory / data / backup

W command

Baca Juga:  Layanan Streaming Mixer Microsoft di Tutup! Kini Mixer KerjaSama Dengan Facebook Gaming

The w command is used to find out who is working on the computer, for example:

Ex. [student @ localhost student] $ w
6:50 pm up 9:15 3 users load average:

USERTTYFROMLOGIN
eriktty112:00am
rismatty213:00am
adetty615:00am

Touch command

The touch command is used to create a new file that has never been created or there is no $ touch $ touch Belajar.txt

Reboot command

The reboot command is used to restart the computer # reboot

Halt command

The halt command is used to turn off the operating system # halt

Pos terkait

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *