Linux setting command

Source: Internet
Author: User
1. Set system environment variables

In many cases, we need to set the system environment variables, such as when using JDK. by editing the bash. bashrc file, we can achieve this goal:
Back up and edit:
Sudo CP/etc/bash. bashrc/etc/bash. bashrc_backup
Sudo gedit/etc/bash. bashrc

Add the corresponding environment variables at the end of the file. These variables are valid for the entire system. For example, if my JDK is on the desktop, add the following line:
Java_home =/home/Aaron/desktop/jdk1.5
Export java_home
Path = $ path: $ java_home/bin
Export path

2. output the man manual page to a file
It is too painful to see man in the command line. We can output it to a file like this:
Man command | col-B> file.txt

3. Calculate the MD5 value of the file
Upload. MD5 to facilitate Viewing:
Md5sum file.txt> file.txt. MD5

4. Check the MD5 value of the file.
Verify that the file.txt and file.txt. MD5 files are in the same folder.
Enter
Md5sum-C file. ISO. MD5
You can.

5. Use "sudo" without a password (this is not secure)
This is very convenient, but it is not encouraged because it is not safe.
On the command line, enter:
Export editor = Vim &&
Sudo shortdo
Find
...
System_username all = (all) All
...
Replace
System_username all = (all) nopasswd: All
Save the file.

6. Killing the "sudo" Process
On the command line, enter:
Sudo-K
You can.

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.