LINUX operating system technology use summary

zhaozj2021-02-16  49

LINUX operating system technology use summary

Linux's soft configuration

Here, the configured object is not a kernel, but a software. As for the configuration of the network, the installation system is already basically completed; or you can enter the GUI interface from the function table to select Liloconf to configure. Like Windows, you can install application software from CDs, flops in the Linux system; but in different, it needs to log in to the disc, the floppy disk machine with the command mount. Moreover, most of the software is compressed, so it is necessary to understand how to extract. Finally, you must configure it to compile. The following is divided into four aspects: 1. MOUNT login Linux's floppower device with special file / dev / fd0, the file system is MSDOS, so log in with the following command, read the floppy disk content: # mount -t msdos / dev / FD0 / MNT / FLOPPY # CD / MNT / FLOPPY, type the following command to read the disc: # mount -t iso9660 / dev / hdb / mnt / cdrom # CD / mnt / cdrew then copy the required software with the CP command In the system. Exit the floppy disk, the disc machine uses the umount command. Note that this command cannot be used in its directory, and you should first CD to other directories, then use: umount / mnt / cdrom. Second, the mounting software is usually ended in .gz or .tar or .tar.gz. The former is compressed by Gzip, the latter is first archive, compressed with Gzip. 1. Using .GZ to compress file, use commands: gzip -d filename to extract, the resulting file is in the current directory, but there is no .gz. 2, in the end of .tar, use the command: tar -xvf filename to expand, generated files and original files in the same directory, just less .tar. 3, the most common file ended with .tar.gz, can be installed directly with the command: gzip -cd filename | TAR XFV - to install. In general, the first item of such files is a directory, so use the above command to create this directory and exist all the files. If it is a special case, you can use the command: tar -tvf filename | more to view the first item of the file. If it is not a directory, create a directory first, put the file under this directory, and install it with the command: TAR-XVF filename. After the above steps, readme and install are generated. Use VI to read these files to part of Linux, more specifically. The general step is: (1) ./ Config, (2) make install, (3) make. The main changes are in the first step, and the parameters are required later, and the visible command is selected: ./ Config --Help.

Linux supports several types of file systems

minix

The oldest, think it is also the most reliable, but the performance is very limited (sometimes there is no sign, the file name is up to 30 fonts) and the capacity is also limited (up to 64MB per such file system).

xia

A revised version of a miniX file system reduces the length of the file name and the file system

Size limit, but there is no introduction of new features. It is not popular, but it is based on the report.

EXT3

Very distinguished file system from Linux, is also the most popular file system today. It is designed to be easy to upgrade so that the new version of the file system code does not need to rebuild the existing file system.

EXT

It is an old version of EXT2, not compatible. It is no longer used in the installation, and

Most people have been converted to EXT2. In addition, some foreign file systems have been supported.

It is easier to exchange files with other operating systems. These foreign file systems work like local, just they lack some of the usual UNIX features, or

Fantastic restrictions or other weird places.

MSDOS

Compatible with MS-DOS (and OS / 2 and Windows NT) FAT file system.

Usmdos

Is the extension of the MSDOS file system under Linux, support long file name, owner,

Permissions, connection, and device files. This makes a conventional MSDOS file system

I want to use Linux's file system, so there is no need for Linux.

Independent partition.

ISO9660

Standard CD-ROM file system; Automatic support allows longer file names ROCK RIDGE extension file system. It is an extension to the standard CD-ROM file system.

NFS

A network file system allows you to share a file system between many computers, which is easy to access to files.

HPFS

OS / 2 file system.

Sysv

Systemv / 386, and Xenix file system.

To select the file system according to the specific situation. If compatibility or other reason makes it necessary to use a non-original file system, one of them must be used. If you can freely choose a file system, then use EXT3 perhaps it is the most known because it has the characteristics and

There is no performance drop. There is also a PROC file system, usually used as a / proc directory, it is actually not

A true file system, although it looks like it looks like it. Proc file system makes access to some internal

The data structure of the core is easy, such as a list of processes (there is also a name). It makes these data structures look like a file system and can use all the usual file tools to operate. For example, to get a list of all processes, you can use the command.

SAMBA services typical three sharing configuration

PUB - does not require a password, and can read and write and delete files. Read-Only - does not need a password, but only you can read the file USER1 - you need your password, read or delete your file. The steps are as follows: 1. First log in to the system with root. Second, edit the /etc/smb.conf file, change "UNIX Password Sync = No" to "Unix Password Sync = YES". In this way, when the system adds the user later, the user's password is automatically updated to the / etc / smbpasswd (Samba account password file). Third, add the following directory under the / home directory and specify the permissions of these directory: / home / Pub NoBody: NoBody 777 / Home / Read-Only Root: root 755 / home / user1 user1: user1 700 four, editing / etc / SMB.CONF This file, modification: security = share 5, edit /etc/smb.conf this file, to the final point of the file Add the following sentences: [public] comment = public all = / home / pub browseable = YES Guest OK = yes writable = yes [read-only] comment = Read-only Areas path = / home / read-only browseable = yes guest ok = yes [user1] comment = Password Required path = / home / user1 browseable = yes writable = yes After the depositor is departed. Sixth, running Samba: Samba RestartWindowsNT and Linux file permissions

Let me talk about the familiar Windows, for WindowsNT, as long as you set the security attributes that everyone who cannot be written (that is, the file permission), no matter which folder can't be deleted, no matter what he What is the security attribute of the folder. When everyone is used to the security attribute settings of Windows, form an idea, whether the file can be deleted whether it depends on the security attribute of this file. I have this concept. Then let's take a look at the increasing Linux system. I use Redhat and red flag Linux, it should be the same. If there is a directory in Linux assumes Share (license DRWXRWXRWX, that is, anyone

Full control), he has a file amtr, assuming that this file is a message written to root, he doesn't want others to see the content of the file, so set the AMTR's permissions to -RW ---- ---, this should be almost the same - if another user executes Cat Amtr in the Share directory, Permission Denied is displayed. However, if another user performs RM Amtr in Share, what is the knot?

Fruit - Amtr is gone. Dorse, other users can be renamed. If you do MV amtr roottmd, huh, this root will definitely look. The reason is because Linux handed the I-NOD information of the file to the directory management. Including the file does not exist, what is the file name, the file is stored in the magnetic piece. As long as you have this directory write permission, you can delete any files under the directory (Note: The file name here is not included) and the file name of any file under the directory (Note: including the directory). Special, for the directory, if your directory is just an empty directory, it is equivalent to a file, it can be deleted. But because Linux can't delete a non-empty directory. As long as your directory doesn't have the right to write and someone else have some files written in the directory, then you can't delete your directory (execute "RM -R directory name" is not cut off from the current directory, but Delete the directory content one by one, so there is no way to delete it), and you will change your name. Everyone should be able to see / TMP permission is Drwxrwrwt, and T means that only creators can modify. It turns out that the reason I think so is that I don't let others delete this directory, set this directory to o T. The reason why you don't let you delete others don't give it, it is in this directory. So be careful not to put your important file in any person's fully controlled directory in linux. Even if the permission of this file is 0.

The license of the file directory is under Linux, each file, each directory has a home owner, and for the user, the user

The group, all other accounts (group) set, write, write, and implement three permissions. For example, I (assuming is the owner of the webusers group's FLOATBOAT account) Use the following command to create a new file mkdir mytestfile and then use the ls -l mytestfile to view this file.

Permission status (with the LS command, you can check the command query of this site), you can get the following screen output display:

-rw-rw-r - 1 floatboat webusers 0 Feb 6 21:37 MyTestFile output is divided into nine parts by space, we care about the first, third, four fields, indicate file permission attributes, files all Group of files and files.

◆ Use the chown command to modify the owner of the file

When you have newly created a file, the owner of the file is of course you. This fact only has a super user (such as root) to change through the chown command (for example, Chown OtherUser MyTestFile, change the home of the MyTestFile file to

Otheruser. Ordinary users can not give their own documents to others, or you have to give ROOT, how do you do a special purpose? :) The usage of the chown command is relatively simple. Here, I first assume that you now have a super user permission, then you can use the following command to "give" floatboat: chown floatboat /home/floatboat/thefileismtcreate.txt (assuming this file is created by root) modification The owner of a directory is also similar: chown floatboat / home / newboat, if there is a child directory and files need to be sent to floatboat at the same time, Chown also supports -R parameters: chown -r floatboat / home / newboat if you At the same time, you want to modify the group to which the file / directory is, you can use the following command to make it easy to achieve the purpose: chown -r floatboat.ftpusers / home / newboat, not only the file owner has been modified, the group belongs to FTPUsers ◆ Modify File group properties

You can change, the premise is: 1, your superuser. 2, you belong to two or more groups. Two conditions You have at least one, you can change the old group of the file to the new group. Like the group to httpd * .html to html files in the current directory using the following command, ChGRP can also use the -R parameter to all of the contents in a directory

The modifier group attributes in the pieces and subdirectory are handed back. : You can use the groups command without the parameters to see which group belongs to. The setting of document permissions is the core of our section discussion, and we mainly introduce two uses of the chmod command.

◆ Use the access string to set the file directory permission

As mentioned earlier, every file, directory is for users yourself, the user is in group, and all other accounts (group) have read, write, and implement three permissions and combinations. When an ordinary user builds a new file, its default access permissions show as shown in the first field we just given. A total of ten-bit font "-rw-rw-r--", the first is the directory distinguishing mark. If it is D, it means this is a directory. The second to four bits represent the read (R: Read), write (W: Write), execute (x: execute) attribute, and the fifth to seven bits are the read, write, execution license of the file owned. Right, the eighth to tenth is the read, write and executive permission of other users. If the corresponding bit is the corresponding letter, there is this corresponding permissive, otherwise "-", indicating that this license is not obtained. The files in just now are readable to be read, this group can read and write, other users can read, all users (including themselves) cannot perform it. We use U, G, O to refer to users (USER), Group (Group), other accounts, respectively.

Other, you can easily set the license for files and directories. Of course, we can also use A to represent all three items. For example, we have to set permissions for all Perl script files. You can read and execute for all users, and the file owner also allows write to license, then we can use the following command: chmod a rx, u w * .pl : If you want to use multiple access strings, they are separated from comma, and there is no space between each license string. As shown in the example. If you want to modify all files and subdirectories in the directory, you can use the -r parameter provided by ChMod to hand back the modification. For example, the following command sets the / www / site1 directory and the subdirectory of the subdirectory below to the owner and group readable, write, execute, other users are not accessible: chmod -r A rwx, O-RWD / WWW / Site1 Note that don't use the -R option easily, this may bring security hidden dangers. It is convenient to use the string, so many letters are still a bit tired, if you have some concepts of 8, you can use the methods described below to do license settings.

◆ Use the eight-boring setting file directory license

We know that in the output of LS -L, the document permission is expressed as "-rw-rw-rw-r," and whether the previous element is only related to the directory, the other nine yuan can be divided into three sections, each paragraph Three, "RW -", "RW-" and "R -", "-" representatives are invalid "0", and the other character representatives are valid "1", then the permission of this file is "110", "110 "," 100 ", converting this 2 Branding string into a corresponding 8-based number is 6, 6, 4, that is, the permission of the file is 664 (three-digit algorithm). We can also use the three-digit album to set the document authorization, such as two examples above, or write as: chmod 755 * .pl chmod -r 770 / www / site1 is not very simple? The key is that you can choose the eight-in number according to the permissions you need to set (using the binary binary in the eight-to-digit number).

◆ Licensed permission instructions for reading, writing

1. The so-called permissions are the permissions to modify and delete files. If the write permission of the directory is also open to you, you can create, delete or modify any files or self-directories in this directory - even if the file and subdirectories are not you. 2. Users who have a licensed licenses to the directory, cannot enter this directory with the CD command; must also have execution permits to enter the directory. 3. You must have read and execute permissions to list the list of directory content lists using LS. 4. Only users who have permission to perform licenses on the directory, want to access files in this directory with documents with permissions, must know that the file name can be accessed.

5 tricks using Linux

1. Eliminate the crane phenomenon under XWindows we can use two common methods to eliminate this phenomenon: First, use the composite keys "Ctrl Alt Backspace" on the keyboard to turn off the currently running task; second, first Press and hold the "Ctrl Alt F2" compound button on the keyboard to switch the system to another, then log in to the system, then execute the "#ps -ax / grepstartx" command, which will list your xserver Process logo, pick up

In the order, enter the downstream phenomenon under XWindows, and finally return to the original platform with the "Alt F1" compound button. 2. Quickly close Linux system latest version of Linux / UNIX system draws on the technology of the mainframe, using anti-charge log file system, automatic tracking of user data, automatically synchronously refreshed file system, users can close the power Thus the purpose of the fast shutdown system. 3, clever use "rm" command We can use the "RM" command with the "-r" parameter to delete a non-empty directory, such as the command to enter "RM -R BBB" in the command line, indicating that the system will put BBB directory included

All files and subdirectories are removed all. 4, clever use "Tab" keys know that when entering commands in the Linux character interface, sometimes you need to enter a lot of characters, if you often enter the character one by one, it is more troublesome. Assuming that the typed character is enough to determine the only file in the directory, we can automatically replenish the remainder of the file name by pressing the "Tab" key on the keyboard, for example, to put the files under the directory / CCC " DDDDDD-1.2.3.tar.gz "When I am packaged, when we

When you type to TAR XVFZ / CCC / D in the command line, if the file is the only "D" in this directory

When you head file, you can press the "Tab" button directly, and the command will be automatically completed as:

TAR XVFZ / CCC/DDDDDDDDD 1.2.3.tar.gz, thereby increasing input efficiency. 5, multi-use mice copy and paste to improve the operating speed Linux system installation, each time you start to the character interface, you will automatically run the "GPM" program. After running, you can use the mouse to copy and paste it. . The specific approach is to drag the left mouse left button to highlight the place to copy, then the area that highlights has been copied, and the content of the right mouse button will be pasted in the position of the cursor. If we run the Linux system under xwindow, copying and paste operations are the same as in the Windows 9x system.

Share files and printers via Samba

SMB (server information block) is a protocol initially developed by Microsoft and Intel, which allows Windows systems to share resources such as disk and printing from each other. It can also be applied to include Linux fields. With SMB, you can turn Red Hat Linux into an SMB client or server, you can allow Windows9x, WindowsNT / 2000 SMB user client users to use your Linux disk and printers; the same, your linux users can also The SMB server uses disks and printers such as Windows9x, WindowsNT / 2000, etc.

1. Install Samba

Install Samba Packages Samba-2.2.1A-4.I386.RPM (under redhat7.2 mounting disk 1 # / redhat / rpms directory), you can use rpm -ivh samba-2.2.1a-4.i386. RPM command installation

2. Configure Samba

Use VI or other editing software to open the contents of the SMB.conf file under the / etc / samba / under the # and; the line represents the contents of the comment, Samba ignore it, with a pair of brackets such as [global] The defined row, it defines a part.

(1) If you want to share the contents in Linux / Pub directory, and set to full sharing, you can log in and mapping the disk partition with Guest this account in Linux or Windows. Do you need to set the following:

Under the [GoBal] field, add NetBIOS records, generally add the next line recorded in Workgroup; NetBIOS Name = Testsamba

· Under the [GoBal] field, modify the SECRITY record;

SECRITY = Share

· Under the [public] field, modify the path record;

Path = / PUB

· Add a guest OK record under the [public] field;

Guest OK = YES

· Delete the "public] field"; "indicates to the"; "to make it work

(2) If the user under Linux wants to share a Windows printer, you need to set the following:

Connect a printer in the Windows system to create a no-handed account. If you can log in directly with this account under Windows; if you are in NT, you can cancel the Guest account in user management, not assigning your password. And granted print permissions in the printer's Security Permission (Permissions). Once these settings are complete, you can prepare to test it.

SMBCLIENT / / Windows Name / SharePrinter Name -u Guest -N -P

Once the connection is complete, you can enter the input of the SMBCLIENT prompt.

Print /Root/viewdbg.txt

Command to print the file. If your printer starts a file normally, then your work has been completed.

Now you can use the redhat based on X-Windows-based PrintTool applications. Add printers to it. Select LAN Windows Management Printer (SMB) and proceed to add the information of the corresponding print server, and use guest as an account, the password is set to an empty value. Test printing can be made after completion.

(3) If the user under Windows is to share a Linux printer, Windows users can log in with guest users and need to do the following:

Open Printer under the [GoBal] field

PrintCap Name = / etc / printcap

Load Printers = YES

Set the printer permissions under the [Printers] field

Comments = all printers

PATH = / var / spool / lpd

Browseable = yes

转载请注明原文地址:https://www.9cbs.com/read-24759.html

New Post(0)