* Log into the operating system (login)
Ex. Linux login: user01
Password:
in the example above a user to log into the computer named linux.
To change the password, typing
Ex. # Passwd
and to get out of linux, typing
Ex. $ Exit or logout
* General Linux Command Syntax
The entire command in Linux is case sensitive, meaning that between uppercase and lowercase letters have different meanings, for example ls will be considered distinct LS
Overall, the commands Linux has the following syntax: commands [option ...] [argument ...]
option: an option that we can use to give a certain result from a command
Argument: is something that will be processed by the command, say the name of the file or directory
Sign (...) indicate that both the options and arguments can be more than one
option: an option that we can use to give a certain result from a command
Argument: is something that will be processed by the command, say the name of the file or directory
Sign (...) indicate that both the options and arguments can be more than one
* Basic Commands
- The command man
Man command is the command to pop up online
help, similar to the command "help" in the operating system
MS-DOS. For example, for displaying online help from
use the ls command:
Ex. $ Man ls
- Pwd command
Pwd Commands used to know in which directories
now located, for example:
[User @ localhost data] $ pwd
[User @ localhost data] $ / home / user / data
- The command cd
cd command is used to move to an in rektori particular. Similar to the cd command on the operating system MS-DOS. If the 'cd' is used without parameters, the results will point to the home directory, for example: [User @ localhost data] $ cd / usr / local / bin [User @ localhost bin] $ pwd [User @ localhost bin] $ in / usr / local / bin
- Ls
- The command man
Man command is the command to pop up online
help, similar to the command "help" in the operating system
MS-DOS. For example, for displaying online help from
use the ls command:
Ex. $ Man ls
- Pwd command
Pwd Commands used to know in which directories
now located, for example:
[User @ localhost data] $ pwd
[User @ localhost data] $ / home / user / data
- The command cd
cd command is used to move to an in rektori particular. Similar to the cd command on the operating system MS-DOS. If the 'cd' is used without parameters, the results will point to the home directory, for example: [User @ localhost data] $ cd / usr / local / bin
- Ls
Ls stands for list displays the contents of a directory. This command is identical to command 'dir' on MS-DOS. If ls is used without parameters, ls will display all files and directories in the current directory. Ls jg able to displays a list of files and directories under the directory we set Use the ls command can also be accompanied by an option-option. The following option-an option that can accompany the ls command: -A displays all files or directories, including beginning with a dot (.) on linux systems, file beginning with a dot are considered as hidden and will not be seen by the ls command without the-a option
-F show the slash mark (/) for directories, signs Asterix (`) for an executable file, sign (@) for symbolic links, sign (=) for the socket, the sign (%) For the whiteout, and the vertical bar (|) to the FIFO
-L displays files and directories in the view which consists of the full size of the file name, the date on modification, the owner, group, and fashion attributes
-R if there is a directory, the contents of that directory will also displayed
Rm command
Rm command is used to delete files or directories, similar to the command 'del' on MS-DOS operating system. To delete a file use the following command: rm
Rmdir Command
Identical to the command "rd" in the MS-DOS operating system basically the same with the command rm-r, but rmdir command requires the directory was empty first (does not contain any files or directories). Directory is not empty can not be deleted with rmdir command, but must use the rm-r
Ex. $ Rmdir / home / studendt / data / public
Mkdir command Mkdir command is used to create a new directory, identical with the command 'md' to the MS-DOS operating system sintaknya: $ Mkdir
Ex. $ Rmdir / home / studendt / data / public
Mkdir command Mkdir command is used to create a new directory, identical with the command 'md' to the MS-DOS operating system sintaknya: $ Mkdir
Ex. $ Mkdir data
Cp command Cp command is identical to the command 'copy' on MS-DOS. Cp command is used to copy a file or directory, Ex. [Student @ localhost student] $ ls-la total 1 -Rw-rw-r - 1 student users July 22 24 7:52 coba.txt [Student @ localhost student] $ cp coba.txt coba1.txt [Student @ localhost student] $ ls-ls total 2 -Rw-rw-r - 1 student users July 22 24 7:52 coba.txt -Rw-rw-r - 1 student users July 22 28 3:42 coba1.txt
Cp command Cp command is identical to the command 'copy' on MS-DOS. Cp command is used to copy a file or directory, Ex. [Student @ localhost student] $ ls-la total 1 -Rw-rw-r - 1 student users July 22 24 7:52 coba.txt [Student @ localhost student] $ cp coba.txt coba1.txt [Student @ localhost student] $ ls-ls total 2 -Rw-rw-r - 1 student users July 22 24 7:52 coba.txt -Rw-rw-r - 1 student users July 22 28 3:42 coba1.txt
Cp-R command
used to copy a directory and all its contents, for example: $ Cp-R / home / student_ / data / backup students will copy the directories under / home directory and all its contents into the directory / data / backup
used to copy a directory and all its contents, for example: $ Cp-R / home / student_ / data / backup students will copy the directories under / home directory and all its contents into the directory / data / backup
W command
W command is used to find anyone who was at work (log) on your computer, for example:
Ex. [Student @ localhost student] $ w 6:50 pm up 9:15 4 users load average: USER TTY FROM LOGIN erik tty1 - 12:00 pm charisma tty2 - 13:00 pm tty6 ade - 15:00 pm
Touch command Touch command is used to create a new file that has not been made or not there $ Touch $ Touch belajar.txt
Reboot command Reboot command is used to restart the computer # Reboot
Halt command Halt command is used to shut down the operating system # Halt
W command is used to find anyone who was at work (log) on your computer, for example:
Ex. [Student @ localhost student] $ w 6:50 pm up 9:15 4 users load average: USER TTY FROM LOGIN erik tty1 - 12:00 pm charisma tty2 - 13:00 pm tty6 ade - 15:00 pm
Touch command Touch command is used to create a new file that has not been made or not there $ Touch $ Touch belajar.txt
Reboot command Reboot command is used to restart the computer # Reboot
Halt command Halt command is used to shut down the operating system # Halt
0 comments: on "BASIC LINUX COMMANDS"
Post a Comment