栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

编程 笔记

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

编程 笔记

Git

Git教程

SVN

SVN教程

Linux

Linux教程 pyenv教程 Ubuntu18.04安装
Ubuntu分区
/:根目录
swap:交换分区
/boot:启动分区
/tmp:临时文件
/home:用户工作目录
/usr:安装软件的文件夹

Ubuntu18.04使用
sudo passwd root		# 设置root
sudo apt install vim

["连接xshell"]
ifconfig		# 显示配置网络
sudo apt install net-tools
sudo apt install openssh-server
sudo ps -e | grep ssh		# 查看ssh [出现sshd即可连接] 

"apt换源"
sudo cp /etc/apt/sources.list /etc/apt/sourses.list.bak
sudo vim /etc/apt/sources.list

# 清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

sudo apt update		# 检查软件包
sudo apt upgrade		# 更新已安装的软件包

"安装pyenv"
# 安装依赖
sudo apt install -y gcc make cmake build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git

git clone git://github.com/yyuu/pyenv.git ~/.pyenv

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init --path)"' >> ~/.profile
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
source ~/.bashrc

"安装Python"
pyenv install -v 3.7.3

[# 离线安装]
cd ~/.pyenv
mkdir cache
cd cache
将Python-3.7.3.tar.xz 放入cache目录
pyenv install -v 3.7.3

pyenv global 3.7.3		# 设置全局Python版本

"安装virtualenv"
git clone git://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv

echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
source ~/.bashrc

"使用python虚拟环境"
pyenv virtualenv 3.7.3 env373	
pyenv activate env373	# 切换到env373
pyenv deactivate	# 退出虚拟环境
pyenv virtualenv-delete env373	# 删除env373

"pip换源"
# 安装pip
sudo apt install python-pip

mkdir ~/.pip
vim ~/.pip/pip.conf

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com

"python版本管理"
python -m pip install --upgrade pip    #升级pip
sudo apt install python3.7
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 11

"安装pycharm"
下载linux社区版pycharm
mkdir -p ~/software/pycharm
tar -zxvf 文件 -C ~/software/pycharm
进入pycharm中的bin文件
./pycharm.sh

# pycharm快捷方式
vim pycharm.desktop

[Desktop Entry]
Name=Pycharm
Exec=/home/qingxu/software/pycharm/pycharm-community-2021.3.2/bin/pycharm.sh
Type=Application
Icon=/home/qingxu/software/pycharm/pycharm-community-2021.3.2/bin/pycharm.png
~                                                                               

sudo cp typora.desktop /usr/share/applications/
全部应用中可以看到Pycharm

"安装typora"
下载linux版本typora
mkdir -p ~/software/typora
tar -zxvf 文件 -C ~/software/typora
cd bin
cp -ar Typora ~/software/typora
.Typora

# typora快捷方式
vim typora.desktop

[Desktop Entry]
Name=Typora
Exec=/home/qingxu/software/typora/Typora-linux-x64/Typora
Type=Application
Icon=/home/qingxu/software/typora/Typora-linux-x64/resources/app/asserts/icon/icon_512x512.png

sudo cp typora.desktop /usr/share/applications/
全部应用中可以看到Typora

"uiauotomator2"
pip install uiautomator2
pip install weditor

python -m uiautomator2 init
pip -m weditor

"安装java"


"安装allure"
curl -O https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/allure-commandline-2.17.2.tgz
mkdir -p /software/allure
tar -zxvf allure-commandline-2.13.8.tgz -C ~/software/allure
cd ~/software/allure/allure-2.17.2/bin
pwd
#配置软链
sudo ln -s /home/userName/devEnv/allure-2.13.8/bin/allure /usr/bin/allure  
allure --version	# 验证

UbuntuQA
1. shell中的三种引号的作用
单引号('')
	单引号里的任何字符都会原样输出,单引号字符串中的变量是无效的
	单引号子串中不能出现单引号(对单引号使用转义符后也不行)
双引号("")
	双引号里可以有变量,转义字符
反引号(``)
	命令替换,通常用于把命令输出结果传给变量中

2. $() 与 ${}
$():里面放的是命令,用来进行命令替换
${}:里面放的是变量,用来引用变量
 

ADB

ADB教程

ADB笔记
"adb 使用的端口号是5037"
adb help	# 查看帮助
adb devices	# 获取设备及设备状态
adb [ -s 设备号 ] shell	# 进入shell
adb shell pm list package	# 列出所有应用包名
adb shell screencap -p /sdcard/screen.png		# 截屏保存至sdcard目录
adb shell screenrecord /sdcard/record.mp4		# 录屏保存至sdcard目录
adb install [-r] <路径apk文件名>	# [重新]安装应用
adb uninstall <包名>		# 卸载应用
adb get-state		# 获取设备状态 device[设备连接正常] offline[连接出现异常,设备无响应] unknown[没有连接设备]
adb pull <远程路径> <本地路径>	# 下载
adb push <本地路径> <远程路径>	# 上传
adb kill-server		# 结束adb服务
adb start-server	# 启动adb服务
adb logcat		# 打印Android系统日志
adb logcat -c	# 清除日志
adb reboot		# 重启设备
adb root		# 获取root权限
adb remount		# 获取root权限,并挂载系统为可读写
adb shell am start -n <包名>/<包名/Activity>		# App启动
adb shell am force-stop <包名>/<包名/Activity>		# APP关闭

Django

Django教程

Vue

Vue教程

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/734139.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号