Archive of News about Google, Technology News,Technical News, Business News, Medical News, and Software Testing News
Friday, August 20, 2010
Basic commands in Linux
Some basic commands in linux important note is as follows:
basic commands linux
1. pwd: This command is used to find the directory where we're located. See the following example:
# Pwd / usr / local In the example above, the pwd command displays the results of / usr / local, meaning that current users are in the directory / usr / local.
basic commands linux
2. cd: this command means "change directory"; used to change directories. Consider the following example to learn how to use the cd command:
# Cd / usr / local command cd / usr / local, make us move to the directory / usr / local.
3. ls: This command is used to determine the contents of a directory. This command is similar to the dir command in a DOS environment.
4. cp: This command is used to make a copy of a file. The format of the command to copy a file is as follows:
# Cp / home / Tedy / contoh.txt / home / Tedy / tests / In the example above contoh.txt existing files in the directory / home / Tedy copied into the directory / home / Tedy / tests.
5. mv: This same command is used to transfer a file from one directory to another directory. This command can also be used to rename a file.
# Mv / home / Tedy / contoh.txt / home / Tedy / test In the above example, the file contoh.txt removed from the directory / home / Tedy to the directory / home / Tedy / tests.
6. rm: This command is used to delete the file.
7. mkdir: This command is used to create directories (folders) new.
8. tar: This command is used to combine multiple files into a single file. Also this command is also used to break the existing tar file into the original file. The format command to create a file from multiple files like the following:
# Tar-cvf sample.tar latihan.txt CHAPTER \ III.doc In the example above, two files; latihan.txt and Chapter III.doc; combined into a single file with the name sample.tar.
Command to open a *. tar file is as follows:
# Tar-xvf file.tar By using the above command, all file.tar contents will be extracted and stored in a new folder with the file name.
9. gzip: This command is used to compress a file that has a smaller size. This command is also used to decompress a file that has been compressed before. To compress a file command is used like this:
# Gzip). To restore files that have been compressed into the original form, the command is as follows: # gzip-d
basic commands linux
10. Clear: This command is used to remove all existing display on the terminal screen. This command is similar to the CLS command in the Windows environment.
11. touch: This command is used to create an empty file,
12. whatis: This command is used to find out what the function of a command. This command will produce a line of a brief description of a command.
13. man: This command is used to read the documentation of the application or command. Its use is to write the name of the application or command that would like to note documentation. By using the man command we can learn the syntax of existing commands.
14. paint: This command is used to display the contents of a file composed of ASCII codes. Suppose we have a text file named latihan.txt in the directory / home / Tedy / tests. If we only want to see the contents of the file we can see that by using the console
15. more: This command is used to display the contents of a file, step by step making it easy to read.
16. grep: This command is used to search for a word / string in a text based files.
17. vi: This command is used to run a text editor Vi. Application of text-based editor Vi is very popular in the Linux environment. Vi has two operating modes: text editing mode and control mode. When we first enter into Vi, we automatically go into control mode. To enter into the text editing mode, press the button i. To move from text editing mode to control mode we use the Esc key. For the first time you use Vi, may be many difficulties because all controlled using the keyboard keys.
18. uname: This command is used to display information from a running system.
19. ps: This command is used to view the processes that are running in our computer
20. su: This command is used to alter the permissions to root. In the Windows operating system, the root is equivalent to the Administrator. Highest root privileges in the user level. Root can modify existing files in the system. Actually not just used su to become root to change access rights, but also to alter the permissions to a specific user. For example, in the operating system there are three users: root, admin, guest. To be able to access file-file/konfigurasi from other users, we can use the command su -.
21. chmod: command is used to change user permissions on a file. There are three types of permissions can be applied to a file, namely: • Read (r): a file can only be read. • Write (w): This type of file can be read at once can be modified. • Execute (X): a file of this type can be executed / implemented.
22. mount: This command is used to install a device that has a file system into the operating system. For example, to see a another partition in the hard disk, to be able to use a USB Flash Drive, to be able to use the CD (remember that a CD / CD image also has a file system), etc.. All of the devices on the Unix operating system is considered as a file / directory. The format of the use of this command is as follows:
# Mount-t / dev / / mnt /
23. umount: This command is used to remove a device from the operating system.
24. date: This command is used to display the date and time at the moment.
25. cal: This command is used to display the calendar in the terminal.
Thus the basic commands linux
I hope this useful basic commands linux
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment