【初始化】ubuntu

ubuntu重装,系统初始化整理

Table of Contents

ubuntu重装,系统初始化整理

1.输入法

2.更换软件源

3.Ubuntu 16.04 + ROS Kinetic的安装

4.安装QT

5.安装VSCode


1.输入法

自带的fcitx

https://blog.csdn.net/qq_37760750/article/details/80394427#commentBox

搜狗输入法

https://www.cnblogs.com/darklights/p/7722861.html

改切换输入法快捷键

2.更换软件源

备份Ubuntu源列表

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup 

 打开更新源列表

sudo gedit /etc/apt/sources.list

推荐阿里云

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

 更新

sudo apt-get update

3.Ubuntu 16.04 + ROS Kinetic的安装

软件中心配置

打开右下角的software and update,按照下图进行配置(确保你的"restricted", "universe," 和 "multiverse."前是打上勾的(左边的4个勾勾))

配置完成后就可以关闭该窗口了。

添加源:

打开一个终端(Ctrl + Alt + T), 输入如下指令:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

设置秘钥:

sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116

安装 ROS

更新系统软件处于最新版:

sudo apt-get update

如果遇到问题:

W: GPG error: http://packages.ros.org/ros/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
W: The repository 'http://packages.ros.org/ros/ubuntu xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

解决方法一:把6AF0E1940624A220换成你出错的码如我的:F42ED6FBAB17C654

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF0E1940624A220

解决方法二:

gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -

解决方法三:

重新更换软件源

记得重新

sudo apt-get update

然后开始安装 ROS,安装全功能版指令如下:

sudo apt-get install ros-kinetic-desktop-full

初始化ROS

首先需要先初始化 rosdep,具体如下:

sudo rosdep init
rosdep update

然后初始化环境变量(重要):

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

安装依赖:

sudo apt-get install python-rosinstall

测试ROS

roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key

有问题参考:

https://blog.csdn.net/luvalluo/article/details/78745677

https://blog.csdn.net/yueyueniaolzp/article/details/85070093#commentBox

4.安装QT

https://blog.csdn.net/lzp_k2/article/details/82662112

5.安装配置VSCode

5.1下载安装VSCode

Visual studio code是微软发布的一个运行于 Mac OS X、Windows和 Linux 之上的,针对于编写现代 Web 和云应用的跨平台源代码编辑器。
第一种方式是从VScode官网下载.deb文件,然后双击该文件会打开软件中心进行安装。

安装完成后,打开终端(Ctrl + Alt + T):

cd /usr/share/code/
code

两条指令输入终端后即可打开VScode,主界面如下:

5.2配置VSCode

参考:https://blog.csdn.net/weixin_43374723/article/details/84064644

6.桌面壁纸

https://wallpaperscraft.com/all/downloads/1920x1080

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值