The following describes the 60 required Linux commands that must be mastered by new users. If you have mastered these commands, your technology will be greatly improved, we hope that the technology will be greatly improved after reading this article.
The following article is followed by 60 required Linux Command 2.
Umount
1. Role
The umount command is used to uninstall a file system. Its permission is granted to a Super User or a user allowed in/etc/fstab.
2. Format
Unmount-a [-fFnrsvw] [-t vfstype] [-n] [-rw] [-F] device dir
3. Instructions for use
Umount
The command is the inverse operation of the mount command. Its Parameters and usage are the same as those of the mount command. After the Linux mounted CD-ROM, The CD-ROM will be locked so that the CD-
The Eject button on the ROM panel pops up. However, if you no longer need a CD, use umount/cdrom to uninstall it if you have used/cdrom as a symbolic link. Only when there is no user
The command is successful only when the CD is being used. This command includes a terminal window that uses the current working directory as the directory in the CD.
Chsh
1. Role
The chsh command is used to change the User shell settings, and its permission is for all users.
2. Format
Chsh [-s] [-list] [-- help] [-v] [username]
3. Main Parameters
-L: displays all Shell types of the system.
-V: displays the Shell version number.
4. Application Skills
We have introduced a variety of shells in Linux. The default is Bash. To change the Shell type, you can use the chsh command. Enter the account password and the new Shell type. If the operation is correct, "Shell change" is displayed ". The interface is generally as follows:
Changing fihanging shell for cao
Password:
New shell [/bin/bash]:/bin/tcsh
In the above Code, the current Shell is used in. Normal users can only modify their own shells. Super Users can modify the shells of all users. To query which shells are provided, run the chsh-l command, as shown in figure 1.
Figure 1 Shell types available for the System
As shown in figure 1, the Shell that can be used in my system includes bash default), csh, sh, and tcsh.
Exit
1. Role
The exit command exits the system and has the permission to all users.
2. Format
Exit
3. Parameters
The exit command has no parameters. After running the command, exit the system and enter the logon interface.
Last
1. Role
The last command is used to display the logon status of recent users or terminals. Its permission is granted to all users. Run the last command to view the log of the program. The administrator can find out who has tried or attempted to connect to the system.
2. Format
1ast [-n] [-f file] [-t tty] [-h node] [-I-IP] [-1] [-y] [1D]
3. Main Parameters
-N: Number of output records.
-F file: specifies that the file is used as the log file for query.
-T tty: only the logon status on the specified virtual console is displayed.
-H node: only the logon status on the specified node is displayed.
-I IP: only the logon status on the specified IP address is displayed.
-1: use an IP address to display the remote address.
-Y: displays the year, month, and day of the record.
-ID: the user name to be queried.
-X: displays the system shutdown, user logon, and logout history.
Hands-on exercises
The above describes the Linux installation and logon commands. The following describes several instances and describes how to practice the commands just mentioned.
1. run multiple commands at a time
You can execute multiple commands in one command line and separate them with semicolons. For example:
# Last-x; halt
The code above indicates that the computer is disabled after the system is disabled, user logon, and logout history are displayed.
2. Use mount mounted file system to access Windows
Many Linux versions can now automatically load Vfat partitions to access the Windows system, while Red Hat versions do not automatically load Vfat partitions. Therefore, manual operations are required.
Mount
The Windows partition can be attached to an empty folder of Linux as a "file" of Linux to associate the partition of Windows with the/mnt directory. Because
Therefore, accessing this folder is equivalent to accessing this partition. First, create a winc folder under/mnt and enter the following command at the command prompt:
# Mount-t vfat/dev/hda1/mnt/winc
That is
To mount Windows C partition to the/mnt/winc directory of Liunx. In this case, the content of drive C in Windows is displayed in the/mnt/winc directory. Enable
You can access the D and E disks of Windows in a similar way. In Linux, Windows partitions are displayed in the following sequence: hda1 is a drive C, hda5 is a drive D,
Hda6 is an e disk ...... And so on. The above method shows that there is a big problem in Windows, that is, all Chinese file names or folder names in Windows are displayed as question marks.
"?", English is displayed normally. We can add some parameters to display Chinese characters. For example, enter the following command:
# Mount-t vfat-o iocharset = cp936/dev/hda1/mnt/winc
Now it can display Chinese characters normally.
3. mount the file system on the flash disk with mount
Using flash disks in Linux is very simple. Linux has good support for USB devices. After a flash disk is inserted, the flash disk is recognized as a SCSI disk. Generally, run the following command:
# Mount/dev/sda1/usb
You can mount the file system on the flash disk.
Knowledge
Linux commands and Shell
Institute
Shell is a command-interpreted program. It provides an interface for programming. Learning Shell is very important for Linux beginners to understand the Linux system.
As the operating system Shell, the Linux system Shell provides users with an interface to use the operating system. Shell is a general term for the command language, command Interpretation Program, and programming language.
The interface program between linux kernels. If you think of the Linux kernel as the center of a sphere, Shell is the outer layer around the kernel. When a Shell or other program transmits a life cycle to Linux
The kernel will respond accordingly. Role of Shell in Linux and COMMAND. COM in ms dos and COMMAND. COM in Windows 95/98
Assumer.exe is similar. Although Shell is not a part of the system core, it is only an extension of the system core, but it can call most of the functions of the system kernel. Therefore, we can say that
Shell is the most important utility in Unux/Linux.
There are multiple types of Shell in Linux, the most common of which is Bourne.
Shell (sh), C Shell (csh), and Korn Shell (ksh ). The default Shell of most Linux releases is Bourne.
Again Shell, an extension of the Bourne Shell, bash for short, is fully backward compatible with the Bourne Shell and
Shell adds many features. Bash is placed in/bin/bash and provides functions such as command completion, command editing, and command history table. It also contains a lot of C
Shell and Korn
The advantages of Shell include flexible and powerful programming interfaces and friendly user interfaces. In Linux, 40 of the more than 200 commands are bash Internal commands, mainly including
Exit, less, lp, kill, cd, pwd, fc, fg, etc.
Click "60 required Linux commands (4)" below to continue viewing.