linux基本用户管理以及基本安装方法 -电脑资料

电脑资料 时间:2019-01-01 我要投稿
【www.unjs.com - 电脑资料】

    在线用户管理命令

    users

    #who

    #startx --:1 再启用一个图形界面

    #w

    #last    记录登录成功信息

    #lastb    记录登录失败信息

    #lastlog  记录每个帐号最后一次登录信息

    #wall    用来广播消息

    #wall “"hello everyone"

    #mesg    显示当前是否接受消息

    #mesg  n  将当前接受消息状态设置为不接受,管理员发送的消息除外

    #write    单播

    #write  username

    第二,

linux基本用户管理以及基本安装方法

。磁盘管理

    #df -h    显示文件系统

    #fdisk  -l 查看磁盘分区

    ::fdisk /dev/sda    对/sda进行分区

    a  toggle a bootable flag  <---把一个分区标识为可引导

    b  edit bsd disklabel    <---编辑一个分区的标签

    c  toggle the dos compatibility flag

    d  delete a partition <----删除一个分区

    l  list known partition types <-----列出分区类型

    m  print this menu  <-------帮助

    n  add a new partition <------新建一个分区

    o  create a new empty DOS partition table

    p  print the partition table <------打印分区表

    q  quit without saving changes <------不保存退出

    s  create a new empty Sun disklabel

    t  change a partition's system id <-----改变一个分区的系统ID

    u  change display/entry units

    v  verify the partition table

    w  write table to disk and exit <-----保存分区表

    x  extra functionality (experts only)

    #partprobe (生成设备文件)

    #mkfs.ext3  /dev/sda10 (格式化设备文件的文件类型)

    #mkfs -t  vfat /dev/sda11 (fat32 fat16都归为vfat)

    分区步骤:

    1、fdisk /dev/sda

    2、生成设备文件

    partprobe

    3、格式化新的分区

    # mkfs.ext3  /dev/sda10

    # mkfs -t vfat /dev/sda11

    4、挂载格式化后的分区                                                    临时挂载:                                                            # mount -t ext3  /dev/sda10  /mnt/sda10

    # mount -t vfat /dev/sda11 /mnt/sda11

    补充:

    mount -o loop,ro  /share/rhel-5.3.iso  /mnt

    mount -o ro -t iso9660 /dev/cdrom  /mnt

    mount --bind /etc/  /tmp/test

    永久挂载:

    #vim /etc/fstab

    LABEL=/            /                ext3  defaults      1 1

    LABEL=/df          /df              ext3  defaults      1 2

    LABEL=/home        /home            ext3  defaults      1 2

    LABEL=/usr          /usr              ext3  defaults      1 2

    LABEL=/boot        /boot            ext3  defaults      1 2

    tmpfs            /dev/shm          tmpfs  defaults      0 0

    devpts            /dev/pts          devpts  gid=5,mode=620  0 0

最新文章