• ubuntu16.04细节设置


    1、查看无线网卡名称

    $ iwconfig
    ------------------
    lo        no wireless extensions.
    
    eth1      no wireless extensions.
    
    eth0      no wireless extensions.
    ------------------

    no wireless extensions指的是没有无线扩展,找不是这种显示的,例如eth1s0

    2、设置动态ip

    $ sudo vi /etc/network/interfaces
    ------------------
    auto eth0
    iface eth0 inet static
    address 192.168.
    ntwork
    
    #增加动态ip
    auto eth1s0
    iface eth1s0 inet dhcp      #dhcp为自动获取
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    --------------------------
    
    $ sudo rm -f /etc/wpa_supplicant/wpa_supplicant.conf  #强制删除文件
    $ sudo wpa_passphrase MyESSID password1234 > /etc/wpa_supplicant/wpa_supplicant.conf   #将wpa_指令内容指向该目录文件,确保与wpa-conf内容保持一致

    3、关闭服务器并且关掉电源

    $ sudo shutdown -P now     #强制关闭服务器和电源
    $ sudo shutdown -h now     #关闭服务器和电源
    $ sudo reboot              #重启
    $ man shutdown             #查看shutdown说明

    4、双系统去掉其中一个启动项

    $ sudo vi /etc/default/grub
    -----------------------
    # If you change this file, run 'update-grub' afterwards to update
    # /boot/grub/grub.cfg.
    # For full documentation of the options in this file, see:
    #   info -f grub -n 'Simple configuration'
    
    GRUB_DEFAULT=0
    GRUB_HIDDEN_TIMEOUT=0
    GRUB_HIDDEN_TIMEOUT_QUIET=true
    GRUB_TIMEOUT=10
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_CMDLINE_LINUX_DEFAULT="quiet"
    GRUB_CMDLINE_LINUX=" net.ifnames=0"
    
    -------------------------
    $ sudo update-grub

    直接删除不要的系统,例如ubuntu16.04

    5、多磁盘分区转化为一个磁盘分区

    $ df -h
    $ sudo fdisk -l
    $ sudo fdisk /dev/sdb
    p      #打开磁盘分区明细
    m      #帮助文档
    d      #删除磁盘分区
    n      #增加一个磁盘分区
    ----------

    Command (m for help): n
    Partition number (1-128, default 1): 1
    First sector (34-1953525134, default 2048): 2048
    Last sector, +sectors or +size{K,M,G,T,P} (2048-1953525134, default 1953525134): 1953525134

    
    

    Created a new partition 1 of type 'Linux filesystem' and of size 931.5 GiB.

    -----------
    w      #保存并且离开

    6、格式化分区并挂载到另外一个系统

    $ mkfs.ext4 /dev/sdb1     #与之前分区名字保持一致
    $ sudo vi /etc/fstab
    -------------------
    UUID=a6ac6edd-8357-4b6d-be24-8dfcb9e46977 / ext4 errors=remount-ro 0 1
    /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
    /dev/sdb1 /data ext4 errors=remount-ro 0 1
    -------------------
    #修改为
    -------------------
    UUID=a6ac6edd-8357-4b6d-be24-8dfcb9e46977 / ext4 errors=remount-ro 0 1

    /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
    /dev/sdb1 /disk1 ext4 errors=remount-ro 0 1
    -------------------
    #将UUID那一行(主要是包含"/"样式的行)复制:光标移动到UUID行,点击两下yy,再将光标移动到最后一列,点击p
    #UUID=...修改为"/dev/vdb1 /disk1",其中/dev/vdb1与之前分区名字保持一致,/disk1随便取得目录名字
    #/desk前面的斜杠表示的是root根目录下

    $ sudo mkdir /disk1
    $ sudo mount /dev/sdb1 /disk1
    $ df -h
    #查看分区是否成功

    etx4针对linux系统

    7、挂载硬盘后取得对应读写权限

    ls -all /
    sudo chown -R mf:mf /disk1
  • 相关阅读:
    夺命雷公狗TP3.2.3商城11-----后台头部和左侧导航分离
    夺命雷公狗TP3.2.3商城10-----中间层的创建,防止跨目录访问
    3.spring cloud eureka 高可用
    2.spring cloud eureka client配置
    1.spring cloud eureka server配置
    css去掉input记住密码的黄色
    34-THREE.JS 游泳圈
    32-THREE.JS 球体
    31-THREE.JS 正方体
    30-THREE.JS 圆环
  • 原文地址:https://www.cnblogs.com/flymeng/p/7211181.html
Copyright © 2020-2023  润新知