zoukankan      html  css  js  c++  java
  • debian10入门(切换root用户,更改网卡配置,及更新apt源配置)

    1、由于debian10系统最小化安装时,有很多命令是没有的,包括sudo命令,这时需要使用su命令切换到到root账户。

    2、debian10更改网卡及DNS配置

    网卡配置更改

    #网卡配置
    vim /etc/network/interfaces
    #网卡配置文件如下:
    allow-hotplug ens33
    iface ens33 inet static
    address 10.0.0.200
    netmask 255.255.255.0
    gateway 10.0.0.2
    
    #DNS配置
    vim /etc/resolv.conf
    #DNS配置文件如下:
    domain localdomain
    search localdomain
    nameserver 180.76.76.76
    nameserver 114.114.114.114

    #重启网卡
    systemctl restart networking.service

    3、debian10换源

    #进入安装源文件
    vim /etc/apt/sources.list
    #将原有的官方源注释掉,加入下面的源
    deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
    deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
    deb http://mirrors.aliyun.com/debian-security buster/updates main
    deb-src http://mirrors.aliyun.com/debian-security buster/updates main
    deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
    deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
    deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
    deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
    #更新
    apt update

     4、debian10配置vim开启右键粘贴

    #修改vim的配置文件
    vim /usr/share/vim/vim81/defaults.vim
    #编辑第78行
    mouse=a 改为mouse-=a

    5、设置ll别名

    #编辑/root/.bashrc文件
    vim /root/.bashrc
    #将以下几行取消注释
    export LS_OPTIONS='--color=auto'
    eval "`dircolors`"
    alias ls='ls $LS_OPTIONS'
    alias ll='ls $LS_OPTIONS -l'
    alias l='ls $LS_OPTIONS -lA'
    #使别名生效
    source /root/.bashrc
  • 相关阅读:
    elasticsearch-5.1.1 安装的问题
    idea 新建New Module时Maven的列表加载不出来
    使用X-Pack插件来进行权限控制
    Groovy学习记录-------Groovy安装/配置
    学习使用Apollo配置中心
    Apollo配置中心介绍
    自定义的GitLab 头像无法正常显示以及URL总是指向localhost
    2020/2/19
    一九八四
    Python 进阶
  • 原文地址:https://www.cnblogs.com/nj-duzi/p/14833633.html
Copyright © 2011-2022 走看看