加入收藏 | 设为首页 | 会员中心 | 我要投稿 鄂州站长网 (https://www.0711zz.com/)- 数据分析、网络、云渲染、应用安全、大数据!
当前位置: 首页 > 综合聚焦 > Ubuntu > 正文

Ubuntu--C++补全代码

发布时间:2020-10-19 19:06:54 所属栏目:Ubuntu 来源:互联网
导读:概要:每次安装完虚拟机时,都要配置自己的环境,好多问题需要一个一个的寻找答案,浪费自己的时间,所以总结了一下留给以后参考使用 一、安装完成如需使用root身份登录,可打开终端输入以下命令: # 设置root密码 sudo passwd root #切换到root用户 sudo -s

概要:每次安装完虚拟机时,都要配置自己的环境,好多问题需要一个一个的寻找答案,浪费自己的时间,所以总结了一下留给以后参考使用

一、安装完成如需使用root身份登录,可打开终端输入以下命令:

# 设置root密码

sudo passwd root

#切换到root用户

sudo -s

想要在登录界面使用root身份登录,可编辑/etc/lightdm/目录下的lightdm.conf文件,如没有此文件,直接创建

/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

1.编辑/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

内容如下

[SeatDefaults]

autologin-user=root

user-session=ubuntu

greeter-show-manual-login=true

allow-guest=false

2.编辑 /root/.profile
vim /root/.profile

打开文件后找到“mesg on”

将其更改为“tty -s && mesg n”

3.用reboot命令重启即可

二、安装Openssh

1、Ubuntu 下安装OPenSSHServer 

sudo apt-get install openssh-server

2、对openssh server 进行配置

vim /etc/ssh/sshd_config

找到permitRootLogin on一行,改为PermitRootLogin Yes

3、重启openssh server

service sshd restart

三、ssh client 报 algorithm negotiation failed的解决方法之一

1、修改sshd的配置文件 /etc/ssh/sshd_config

Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc

MACshmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96

KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org

2、重启服务

sudo /etc/init.d/ssh restart 重启sshd服务后,即可正常连接。

四、同步时间

安装ntpdate工具

# sudo apt-get install ntpdate

1.首先查看时区:

date -R

Tue,17 Dec 2013 18:23:01+0800

如果要修改时区,执行sudo tzselect

2.选择区域:亚洲

sudo tzselect

Please identify a locationso that time zone rules can be set correctly.

Please select a continentor ocean.

1) Africa

2) Americas

3) Antarctica

4) Arctic Ocean

5) Asia

#? 5

3.选择国家:中国

Please select a country.

9) China 26) Laos 43) Taiwan

#? 9

4.选择时区:北京时间

Please select one of thefollowing time zone regions.

1) east China - Beijing,Guangdong,Shanghai,etc.

2) Heilongjiang (exceptMohe),Jilin

#? 1

(编辑:鄂州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读