zoukankan      html  css  js  c++  java
  • Linux学习笔记(不断更新。。。)

    Linux学习笔记(不断更新。。。)

    获取Root权限

    在终端中输入:
    sudo passwd root
    Enter new UNIX password: (在这输入你的密码)
    Retype new UNIX password: (确定你输入的密码)
    passwd: password updated successfully

    以后,如果在想获得root权限,只需进行如下的操作:
    su root
    Password: (在此输入你上面设置的密码)

    如果要再次禁用 root 帐号,

    那么可以执行 sudo passwd -l root


    vi(shell文本编辑器)保存、退出命令
    :w /* save not exit */

    :w newfilename /* save as use name "newfilename" */

    :q /* exit, only the file not changed */

    :q! /* exit not save file, all change will been give up */

    设置IP
    我这里网卡名为:enp2s0,同时记录下掩码地址,下面会用到这两个参数。

      终端输入vi /etc/network/interfaces命令编辑配置文件,增加如下内容:     
        auto enp2s0
        iface enp2s0 inet static
        address 192.168.1.211
        netmask 255.255.255.0
        gateway 192.168.1.1
        iface enp2s0 inet6 auto

    重启网络

    gec@ubuntu:~$ sudo /etc/init.d/networking restart

    * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces

    * Reconfiguring network interfaces...

  • 相关阅读:
    bzoj1724[Usaco2006 Nov]Fence Repair 切割木板*
    vue-cli脚手架和webpack-simple模板项目
    Vue-router 进阶
    前端路由vue-router介绍
    vue的一些特殊特性
    生命周期钩子
    过滤器
    RSA加密算法
    欧几里得算法
    动态规划
  • 原文地址:https://www.cnblogs.com/Rock-lynn/p/14000536.html
Copyright © 2011-2022 走看看