PHP100 excellent: Very reliable common linux commands

Source: Internet
Author: User
Tags ftp commands

Vim is used to open the vim editor. Other Editors include vi (which is not powerful than vim), nano, and emacs. It feels like vim is the most powerful, followed by vi, which is worse than others. I heard from our teacher that the graphic interface itself will be laughed at by the experts. If you open a gpedit or kwrite, it will be abolished ......
Common commands
Ls: List objects in the current directory. ls-l is used to list details. ls-a is used to list hidden objects.
Cd to change the directory. Clear, clear screen command. Reset, reset the terminal.
Startx: Start the graphic interface. Fdisk-l to view hard disk partitions.
Ps aux: list system processes. Cat: displays text. Tac: displays text in reverse order.
Od: displays text in binary format. Wc to determine the number of lines and characters of the file.
Aspell: Check for spelling errors in the file. Less: reads files by page. More, similar to less, but less functional.
Reboot: restart the system. Poweroff: Shut down. Halt, also shut down, but need to manually cut off the power, not recommended. Shutdown-h now: Shut down immediately. now can be replaced with a time command to specify the shutdown time. It is said that a good system administrator should use this command. Shutdown-r now, similar to the previous one, is just a restart. Sync, synchronize hard disk data, and use it multiple times before restarting or shutting down.
Locate: query the file location. The updatedb command should be used at intervals to provide the search range. Find is a powerful query command with many parameters. Find/-name *, which means to query all files under.
Whereis, I use it to determine the location of the command, such as whereis ls.
Sudo: Use the root permission in the case of a common account, but you need to modify the/etc/sudoers file.
Mv, move the file or rename it. Mv/etc/*/home/tom means to move all/etc files to the tom directory. Mv a B: Rename a to B. Of course, this is just an example. You need to determine the operation based on the specific situation.
Cp, similar to mv, is also the same format, but not mobile, is replication. If the directory is copied, you need to use the-r parameter, cp-r ***.
Rm. This is the DELETE command. Similar to cp, if you delete a directory and add-r, you are prompted to delete the Directory and use-I.
Useradd: Add a new account. Userdel: delete an account.
Passwd, which is used to set a password for an account. There are many parameters to implement other functions.
Chown to change the file. For example, to change the chown tom. tom file name to the tom group, the owner is also tom.
Chmod: Change the File Permission. It is just a simple change. The chmod 777 file name will have all the permissions for the file.
Chkconfig -- list, used to observe the service status. chkconfig -- level? Service name on/off, enable or disable the service ,? Indicates the running level.
Init (1, 2, 3, 4, 5, 6) is used to switch between six running levels.
Runlevel: view the current running level.
Bc, a calculator. Date: displays the time. Cal displays the calendar.
For redhat, there is also setup, which is used to set some system-related ntsysv, specifically used to set the service, so that chkconfig is not needed.
Tr, compression or replacement character. Dh: calculates the directory size. Df: displays information about the file system.
Free: displays the memory cpu usage. Top: dynamically observe the process.
Tar-czvf, create * .tar.gz, tar-xzvf, and decompress this package.
Tar-cjvf, create * .tar.bz2, and decompress tar-xjvf.
Rpm-ivh, rpm package installation, rpm-e uninstall rpm package
Who to observe the logon status. Whoami, who am I, two commands have some differences, but they are similar. Id, used to view account information. W. It is also used to view logon information for more details.
Echo, used to display environment variables, etc. Example echo $ LANG.
History: displays the command history. Mount mounted on the device. Umount, uninstall the device. Dmesg, which displays the startup information. Yum, the command used for updating.
Ssh and ssh logon. Telnet and telnet logon. There are also ftp commands.
Gcc, g ++, java, and javac are all programming commands. Make. If makefile exists, you can use it to compile it.
The above is what I think of in the future, it is inevitable that there are errors, and the order seems not very good, please forgive me.
In addition, not all commands may occur due to installation package problems. If you need some features, you need to install the corresponding package file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.