Mount command
Mount [–l] #查看系统中已经挂载的设备
Mount–a #依据配置文件/etc/fstab content, automatically mount, to detect the correct contents of the file
Mount [-t file system] [-l volume label name] [-o Special Options] device file name mount point
you can use \ To break a line when the command line is not written
-T File system: Specifies the type of mount, which can be ext3, EXT4, ISO 9660, and other file system-L volume label name: Mount the partition of the specified volume label instead of installing the device file name mount
-O Special option: You can specify additional options for mounting, such as read and write permissions, synchronous async, etc., not specified as default values
Atime/noatime Update access time, do not update access time. When accessing a partition file, whether to update the access time of the file, the default is update
Async/sync asynchronous/synchronous, default to asynchronous
Auto/noauto Automatic/Manual, when the Mount–a command executes, the/etc/fstab file content mount is automatically installed, the default is auto
Defaults defines the default value, which is equivalent to the seven options of Rw,suid,dev,exec,auto,nouser,async
Exec/noexec Execute/Not execute, set whether executable file is allowed in file system, default is allow
Remount re-mounts the mounted file system, which is typically used to specify special permissions to modify
Re/ro read/write/read-only, file system mount, read and write permissions, default is RW
Suid/nosuid has/does not have SUID permissions, set whether the file system has suid and Sgid permissions, the default is to have
User/nouser Allow/Disallow normal user mount, set whether the file system allows ordinary users to mount, default is not allowed, only root can mount the partition
Usrquota write on behalf of file system support user disk quotas, default does not support
Grpquota write represents the file system support Group disk quotas, which are not supported by default
Mount–o remount,noexec/boot #重新挂载/boot partition and use noexec permissions
Mkdir/mnt/cdrom
Mount–t Iso9660/dev/cdrom/mnt/cdrom #光盘挂载
Umount/mnt/cdrom #光盘卸载
Fdisk–l #查看所有分区, determine the device file name of the U disk
Mkdir/mnt/usb #建立挂载点
Mount–t vfat–o iocharset=utf8/dev/sdb1/mnt/usb #挂载U盘, specify Chinese encoding to UTF8
utf8=gb2312
Common drivers in Linux are placed in the kernel, and infrequently used drivers become modules. Both the module and the library are functions.
*.ko Drive *.so function
Linux default does not recognize NTFS format, if you want to use it, you must recompile the kernel
Mount NTFS partitions
1. Recompile
2. Loading the NTFS module
Uname–r #查看本机内核版本
Download kernel version similar to core
TAR–JXVF linux-2.6.32.tar.bz2 #解压内核压缩包
Cp–r linux-2.6.32/usr/src/kernels/#复制内核源码到默认内核源码保存位置
Mount/dev/cdrom/mnt/cdrom
rpm–ivh/mnt/cdrom/packages/kernel-devel-2.6.32-279.el6.i686.rpm
#安装rpm包的不完整内核源码
cp/usr/src/kernels/2.6.32-279.el6.i686/.config/usr/src/kernels/linux-2.6.32/
#从rpm包的内核源码中, copy the. config file into the source bundle's kernel source code
Vi/usr/src/kernels/linux-2.6.32/.config
Config_ntfs_fs=m
cd/usr/src/kernels/linux-2.6.32/
#编译命令一定要进入内核目录才能执行, because the compilation command compiles the current directory
Make modules #安装模块, during the execution of the command, you will need to select which modules need to be installed, select only the NTFS related modules, the other modules do not install
NTFS File system Support (NTFS_FS) [m/n/y/?] M
NTFS Debugging support (Ntfs_debug) [n/y/?] (NEW) Y
NTFS Write Support (NTFS_RW) [n/y/?] (NEW) Y
#编译过程结束就能看到ntfs. KO modules
Ll/usr/src/kernels/linux-2.6.32/fs/ntfs/ntfs.ko
CP fs/ntfs/ntfs.ko/lib/modules/2.6.32-279.el6.i686/kernel/fs/
#把ntfs. Ko copy to the specified location
Depmod–a #扫描所有模块
Modprobe–f NTFS #强制安装ntfs模块
Lsmod | grep NTFS #查询安装的ntfs模块
3. Installing the NTFS file system module using NTFS-3G
www.tuxera.com/community/ntfs-3g-download/download ntfs-3g plugin to Linux server
Before compiling and installing the NTFS-3G plug-in, ensure that the GCC compiler is installed
TAR–ZXVF ntfs-3g_ntfsprogs-2013.1.13.tgz #解压
CD ntfs-3g_ntfsprogs-2013.1.13 #进入解压目录
./configure #编译器准备
Make install #编译安装
Mount–t Ntfs-3g/dev/sdb1/mnt/win #挂载
VI Editor: Full-screen plain text editor, Vim is a reinforced version of VI. (Vimtutor Open Manual)
VI working mode: Command mode, input mode, last line mode
A specifier insert in the word cursor
A at the end of the line where the cursor is inserted
I match either insert in the word cursor
I Insert at the beginning of the line where the cursor
o Insert a new line under the cursor
O insert a new line on the cursor
: w #保存
: W File name #另存为
: q! #强制不保存退出
: wq! #强制保存退出: x zz:sh
: X #加密解密文件, decryption not lost password direct return
Move cursor HJKL lower left top right
GG #光标移到文件头
Shift+g/g #光标移到文件尾
^/home #光标移到行首
$/end #光标移到行尾
: N #光标移到第几行
x/x #删除单个字母 (front/rear)
NX #删除几个字母
DW #删除词
DD #删除单行
NDD #删除多行
d+^ #从光标处删除到行首
D+$/D #从光标处删除到行尾
DG #从光标处删除到文件尾
: n1,n2d #删除指定范围的行
P #粘贴
P (Large) #粘贴到光标前
YW #复制单词
YY #复制一行
Nyy #复制多行
U #撤销
Ctrl+r #反撤销
: e! #撤销所有操作
/#查找内容, n Next, N prev
R #替换光标所在处的字符
R #从光标所在处开始替换字符, press ESC to end
:%s/old/new/g #用new替换所有old
: n1,n2s/^/\/\//g #文件头加入//
: AB source character replaced by character
: Set Nu #显示行号
: Set Nonu #不显示行号
: Syntax on #打开颜色开关
: Syntax off #关闭颜色开关
: R! Command #把命令输出结果写入光标所在行
: R file name #导入其他文件内容
:! Command #在vi中执行系统命令
: Command for the Map shortcut key (ctrl+v+p) shortcut #设置快捷键
VI +n file name #打开定位到第n行
vi–o/o file 1 File 2 #多文件操作
Ctrl+w+ Arrow/:next:p rev switch different files
VI/~/.VIMRC #修改配置文件
This article is from the Linux consolidation Notes blog, so be sure to keep this source http://lt519.blog.51cto.com/10672050/1701338
Linux Basic Consolidation 3