linux 2021

常用安装

sudo apt install openssh-server  # 安装ssh
service ssh  # 查看ssh服务的

基础

Debian 是Ubuntu的母板,有强大的包管理功能,使用 Advanced Packaging Tool 工具管理;
常用的Linux包管理命令被分散在了 apt-get apt-cache apt-config 中;

apt 命令 包括 apt-get/apt-cache/apt-config 中最常用命令选项的集合。
推荐以后使用 apt。

安装anaconda

bash Anaconda3-2021.05-Linux-x86_64.sh
#将默认的python编译器设置为 anaconda
# 打开配置文件
sudo gedit ~/.bashrc
# 将以下语句写入文件
export PATH="/home/testing/anaconda3/bin:$PATH"
# source一下
source ~/.bashrc

安装idea

快捷方式的目录:
.cache/JetBrains/Idea/

source

常用: source filepath 或 ./filepath
功能:使用当前shell读入路径为filepath的 shell文件并依次执行文件中的所有语句,通常用于重新执行刚修改的初始化文件,使之立即生效,不必重启。
. 点命令是source的另一个名称,一般用source较多,.的适用场景更少。

export

设置或显示环境变量
在shell中执行程序时,shell会提供一组环境变量。

# 定义环境变量并赋值
export MYENV=7
# 显示所有的环境变量
export -p

基本操作

复制

# 将test.c 文件复制到 另一个文件夹下
cp -i test.c /local/arm

adb

adb 提示没有权限时:

# 切换到adb程序的目录,运行如下命令:
chown root:root ./adb
chmod 4777 ./adb

原文地址:https://www.cnblogs.com/qev211/p/15050086.html