• 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
  • 相关阅读:
    cocos2dx3.0戳青蛙游戏(打地鼠)
    深入理解Tomcat系列之五:Context容器和Wrapper容器
    linux下拷贝隐藏文件
    8.8.1 运行计划
    UVALive
    堆排序实现
    C语言中的signal函数
    uboot和内核分区的改动
    Android缩放动画
    .Net 自定义应用程序配置
  • 原文地址:https://www.cnblogs.com/nj-duzi/p/14833633.html
Copyright © 2020-2023  润新知