BM00019——|bookmarks|ubuntu20.04.1配置固定IP地址/开启root权限/开启ssh服务/配置国内源地址|

本文档详细介绍了如何在Ubuntu 20.04.1上开启root权限,配置静态IP地址,启用SSH服务以便通过xshell远程连接,以及更换为国内软件源以加速下载速度。

一、Ubuntu启动root用户权限,并使用root登录xshell远程工具

//Ubuntu20.04.1安装完成之后默认是没有root用户登录权限:
//1、使用普通用户登录,创建root用户的密码
yanqi@ubuntu:~$ sudo passwd
[sudo] password for yanqi:
New password:
Retype new password:
passwd: password updated successfully

//2、修改/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf配置文件
yanqi@ubuntu:~$ ll /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
-rw-r--r-- 1 root root 29 3月  26  2020 /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
yanqi@ubuntu:~$ sudo chmod 666 /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
yanqi@ubuntu:~$ ll /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
-rw-rw-rw- 1 root root 29 3月  26  2020 /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
yanqi@ubuntu:~$ sudo vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
greeter-show-manual-login=true
all-guest=false

//3、修改/etc/pam.d/gdm-autologin配置文件:
yanqi@ubuntu:~$ ll /etc/pam.d/gdm-autologin
-rw-r--r-- 1 root root 1192 10月  8  2019 /etc/pam.d/gdm-autologin
yanqi@ubuntu:~$ sudo chmod 666 /etc/pam.d/gdm-autologin
yanqi@ubuntu:~$ ll /etc/pam.d/gdm-autologin
-rw-rw-rw- 1 root root 1192 10月  8  2019 /etc/pam.d/gdm-autologin
yanqi@ubuntu:~$  sudo vim /etc/pam.d/gdm-autologin
#auth required pam_succeed_if.so user != root quiet_success             //注释掉第三行

//4、修改/etc/pam.d/gdm-password配置文件:
yanqi@ubuntu:~$ ll /etc/pam.d/gdm-password
-rw-r--r-- 1 root root 1320 10月  8  2019 /etc/pam.d/gdm-password
yanqi@ubuntu:~$ sudo chmod 666 /etc/pam.d/gdm-password
yanqi@ubuntu:~$ ll /etc/pam.d/gdm-password
-rw-rw-rw- 1 root root 1320 10月  8  2019 /etc/pam.d/gdm-password
yanqi@ubuntu:~$ sudo vim /etc/pam.d/gdm-password
#auth required pam_succeed_if.so user != root quiet_success             //注释掉第三行的

//5、修改/root/.profile配置文件
yanqi@ubuntu:~$ su root
root@ubuntu:~# ll /root/.profile
-rw-r--r-- 1 root root 161 12月  5  2019 /root/.profile
root@ubuntu:~# chmod 666 /root/.profile
root@ubuntu:~# ll /root/.profile
-rw-rw-rw- 1 root root 161 12月  5  2019 /root/.profile
root@ubuntu:~# vim /root/.profile
# mesg n 2> /dev/null || true           //注释掉这一行
tty -s&&mesg n || true                  //添加tty开启状态

二、Ubuntu配置虚拟机静态固定ip地址:

root@ubuntu:~# vim /etc/netplan/01-network-manager-all.yaml
  ethernets:
          ens33:
                  dhcp4: false
                  addresses: [192.168.1.92/24]
                  gateway4: 192.168.1.1
                  nameservers:
                          addresses: [114.114.114.114,8.8.8.8]

root@ubuntu:~# netplan apply

三、Ubuntu开启ssh服务,并通过xshell远程连接:

root@ubuntu:~# apt-get install openssh-server openssh-client
root@ubuntu:~# chmod 666 /etc/ssh/sshd_config
root@ubuntu:~# vim /etc/ssh/sshd_config
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin prohibit-password
PermitRootLogin yes
StrictModes yes
root@ubuntu:~# systemctl restart ssh

四、更改Ubuntu下载原地址为国内源

root@ubuntu:~# chmod 666 /etc/apt/sources.list
root@ubuntu:~# vim /etc/apt/sources.list            //编辑配置文件,更换为国内源地址  //使用清华源地址
root@ubuntu:~# apt-get update && apt-get upgrade    //可以保证系统的完整性(upgrade更新,若依赖关系无法解决可能会报错或停止)                   
root@ubuntu:~# apt-get dist-upgrade                 //该命令也是更新所有软件包(慎用:自动解决依赖关系,可能更新一些不需要更新的包,导致一些需要依赖就报的程序无法运行)。
root@ubuntu:~# apt-get clean        

国内常用源地址:

# 阿里云源地址
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

# 清华源地址
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-proposed main restricted universe multiverse
上市公司企业生命周期数据是评估企业发展阶段、战略适配性及投资价值的核心依据,其核心在于通过量化指标刻画企业生命周期阶段本文参考李云鹤等(2011)、梁上坤等(2019)的研究方法,采用综合得分法,根据“销售收入增长率、留存收益率、资本支出率、企业年龄”等四个指标计算综合得分,再根据综合得分高低按行业由大到小排序,分别将企业划分为”成长期、成熟期、衰退期“企业➤企业生命周期1的划分依据:参考李云鹤等(2011)的划分方式,得分最高的约 1/3 部分为成长期的企业,得分最低的约1/3 部分为衰退期的企业,中间一部分为成熟期企业➤企业生命周期2的划分依据:参考梁上坤等(2019)的划分方式,得分最高的约1/4为成长期企业,得分最低的约1/4为衰退期企业,中间1/2为成熟期企业一、数据介绍数据名称:上市公司企业生命周期数据数据范围:A股上市公司时间范围:2000-2024年样本数量:68851条数据来源:上市公司年报更多说明:内含原始数据、测算结果、测算dofile文件二、数据指标股票代码股票简称年份省份城市区县省份代码城市代码区县代码行业代码行业名称首次上市年份是否ST或金融类营业收入增长率净利润留存收益年初总资产购建固定资产、无形资产其他长期资产支付的现金总得分企业生命周期1企业生命周期2
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yanqi_vip

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值