配置Ubuntu 20.04开发环境

本文详细介绍了在Linux系统中进行基础配置,包括更新包管理器、安装C语言编译环境、升级Python版本,以及配置SSH服务,如生成密钥对、启动ssh-server、修改sshd_config和authorized_keys。
摘要由CSDN通过智能技术生成

一、基础配置

1. 更新apt

sudo apt update

2. 设置密码

更改密码:

sudo passwd user

删除密码:

sudo passwd -d user

三. 安装C语言编译环境

sudo apt install gcc
sudo apt install build-essential
sudo apt install cmake
sudo apt install mingw-w64  # for cross compile

三. 重装python

安装python指令:

# install python
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa

sudo apt-get remove python3.8  # unistall old version, may install in when installing software-properties-common
sudo apt autoremove

sudo apt install python3.10
sudo ln -s /usr/bin/python3.10 /usr/bin/python3
# install pip
cd ~
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python3 get-pip.py

四. 配置ssh

1. 创建密钥

mkdir ~/.ssh
cd ~/.ssh
ssh-keygen -t ed25519 -C "AddSomeComments"
git config --global user.name "YourName"
git config --global user.email "email@example.com"

2. 配置ssh-server

运行命令“sudo service ssh start”,若无法启动,输入下面的命令:

sudo ssh-keygen -A
sudo service ssh start

3. 配置sshd_config

文件位置:/etc/ssh/sshd_config

PermitRootLogin yes
PasswordAuthentication yes
PermitEmptyPasswords yes

4. 配置authorized_keys

编辑"~/.ssh/authorized_keys"文件,将远程访问的电脑的公钥复制到其中

若要为root配置,可将.ssh复制到"/root"目录中

为了在Ubuntu20.04系统上配置ROS开发环境,你可以按照以下步骤进行操作。首先,确保你选择的ROS版本与Ubuntu20.04兼容。不同的ROS版本需要对应的Ubuntu版本,所以记得不要随意安装。你可以参考ROS官网(https://wiki.ros.org/ROS/Installation)上的详细指南来进行配置。 第一步是配置ROS软件源。你可以在终端中运行以下命令来添加ROS软件源: ``` 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://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 ``` 然后,更新系统软件源以获取最新的软件包信息: ``` sudo apt update ``` 最后,你可以安装ROS。根据你选择的ROS版本,运行以下命令来安装ROS: ``` sudo apt install ros-noetic-desktop-full ``` 这样,你就成功地在Ubuntu20.04配置了ROS开发环境。希望这个回答对你有所帮助!<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Ubuntu系统:为Qt配置ROS开发环境](https://download.csdn.net/download/ltstudying/11155539)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [ROS 笔记(01)— Ubuntu 20.04 ROS 环境搭建](https://blog.csdn.net/wohu1104/article/details/125271178)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值