Enjoy the convenience of application-linux system three cool tips _unix Linux

Source: Internet
Author: User

(Hebei Lee So)

Modify MAC address under Linux

MAC address is the physical address of the network card, in Windows system, we can modify the registry method, cheated the system, modify the MAC address. In fact, under Linux can also change the MAC address:

1. Turn off the NIC device
/sbin/ifconfig eth0 Down

2. Modify MAC Address
/sbin/ifconfig eth0 hw Ether MAC Address

3. Restart the network card
/sbin/ifconfig eth0 up

Allow ordinary users to safely execute administrator programs

This is often the case when multiple people share a computer or manage a local area network: An ordinary user must perform a command, such as a shutdown. But ordinary users do not have sufficient privileges, and for privacy and security reasons, we do not want to tell others the root password.

There are two ways to solve this problem.

The first method is to set the suid of the command file so that ordinary users can run the program as the owner of the file, with the specific command chmod u+s file, which you want someone else to execute. You can also set the GUID to allow the user to run the program as the group to which the file belongs, and the command is chmod g+s file.

The second approach is to use the Sudo program, which allows a user to run the program in a particular identity, and, of course, as root, which is safer and easier to maintain than the first method. This tool is available in the Redhat release CD. Using the method, enter the Visudo edit sudoers file in the terminal and add the following four lines in the margin:

Host_alias Myhost=localhost
User name of User_alias myuser=a, username of b
Cmnd_alias Myfile=a and b The program path to run
MyUser Myhost=nopasswd:myfile

Note that when you add a new program or user in the future, you can change the first three lines directly. If you want a user who does not know the root password to have full permissions, you need to add only if you are running some dangerous programs (such as formatting):

Path of Cmnd_alias danger= dangerous program

C's username all= (all) nopasswd:all,! DANGER

After the setup is complete, save and exit as VI, the editor will automatically check that your grammar is correct, and if you make an error, you can go back and modify it. The user can then run the specific command in the format "sudo+ a space + command". Anon

Enjoy ape in the XMMS

Ape is a lossless music compression format, enjoying its high quality music in the Linux Media Player XMMS, which requires compiling Monkey audio plugin for XMMS (this article takes Fedora Core2 release as an example).

First go to the download page http://supermmx.org/linux/mac/download libxmms_mac-0.2.0.tar.gz mac-3.99-linux.tar.gz file, and then start decompression compilation (in the Command Terminal):

# tar XZVF libxmms_mac-0.2.0.tar.gz
# tar XZVF mac-3.99-linux.tar.gz
# CD mac-3.99
#./configure

If the system prompts for less NASM, load the Fc2-i386-disc2.iso (or the 2nd System Setup disk) and install it:

# RPM-IVH nasm-0.98.38-2.i386.rpm
# make
# sudo make install
# CD Plugin
#./configure

If you find that Xmms-config cannot be found, locate the Xmms-devel in the Fc2-i386-disc4.iso (or the 4th System Setup disk):

# RPM-IVH xmms-devel-1.2.10-2.p.i386.rpm
# make
# sudo make install

Now open XMMS, you can enjoy the wonderful music of ape ^_^.

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.