• Deepin常用环境配置


    常用软件apt安装

    # 更新源:
    sudo apt update
    # 更新软件:
    sudo apt upgrade
    
    sudo apt install net-tools
    sudo apt install tree
    sudo apt install screen
    sudo apt install kolourpaint 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    系统设置

    Root用户

    sudo passwd root (设置密码)
    su root (切换用户)
    exit (退回到切换之前的用户)
    
    • 1
    • 2
    • 3

    配置环境变量

    # 打开全局环境配置文件
    gedit /etc/profile
    
    # 将以下配置信息 复制到 profile文件中
    export PATH=$PATH:$GOROOT/bin:$GOPATH/bin:/home/hero/wtt-profile:/usr/local/node-v14.18.1-linux-x64/bin
    
    # 重启全局生效 or source一下
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    自定义命令 de 环境变量

    gedit /etc/profile
    
    # 自定义命令
    export WTT=/home/hero/wtt-profile
    # 环境PATH变量
    export PATH=$PATH:$WTT
    
    注意:
    1、一个配置文件中只能有一个: export PATH=$PATH:.......
    2、多个路径之间用 冒号 隔开。
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10

    自定义 命令标签

    gedit  ~/.bashrc  
    
    #加入以下 命令快捷键
    # some more ls aliases
    alias ll='ls -alF'
    alias la='ls -A'
    alias l='ls -CF'
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    Golang环境

    • 下载SDK包:https://studygolang.com/dl
    wget https://studygolang.com/dl/golang/go1.17.7.linux-amd64.tar.gz
    
    • 1
    • 转至root用户, 然后使用tar命令将安装包解压到/usr/local目录下:
    su root
    tar -xzf go1.版本号.linux-amd64.tar.gz  -C /usr/local
    
    • 1
    • 2
    • 验证解压安装结果
    /usr/local/go/bin/go version
    
    • 1
    • 创建目录
    mkdir -p /home/hero/golang/gopath
    cd /home/hero/golang/gopath
    mkdir bin pkg
    
    • 1
    • 2
    • 3
    • 配置环境变量
    # 打开全局环境配置文件
    gedit /etc/profile
    
    # 将以下配置信息 复制到 profile文件中
    export GOPATH=/home/hero/golang/gopath
    export GOROOT=/usr/local/go
    export GOARCH=amd64
    export GOOS=linux
    export GOTOOLS=$GOROOT/pkg/tool
    export GO111MODULE=on
    export GOPROXY=https://goproxy.io
    export PATH=$PATH:$GOROOT/bin:$GOPATH/bin:/home/hero/wtt-profile
    
    # /home/hero/wtt-profile (将该文件路径定为 环境变量 的 PATH 变量)
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 重新加载修改过的 profile 文件 使其生效
      source /etc/profile
      go version
      重启全局生效

    Python3环境

    • pip3
    sudo apt install python3-venv python3-pip
    
    pip3 --version # pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)
    
    • 1
    • 2
    • 3
    • 配置pip 和 pip3 的国内阿里镜像安装源
    mkdir -p ~/.pip
    touch  ~/.pip/pip.conf
    
    # 在 pip.conf 文件中写入:
    [global]
    timeout = 6000
    index-url = https://mirrors.aliyun.com/pypi/simple/
    trusted-host = mirrors.aliyun.com
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    NodeJS环境

    • 下载 node、npm的可执行文件的压缩包
    wget https://npm.taobao.org/mirrors/node/v14.18.1/node-v14.18.1-linux-x64.tar.xz
    
    # 得到 node-v14.18.1-linux-x64.tar.xz 压缩文件
    
    • 1
    • 2
    • 3
    • 转至root用户, 然后使用tar命令将安装包解压到/usr/local目录下:
    # 由于node官网的压缩使用的是 xz压缩,而不是tar的gz压缩,所以先用xz命令解除xz压缩得到一个tar包
    xz -d node-v14.18.1-linux-x64.tar.xz
    
    
    su root
    tar -xf node-v14.18.1-linux-x64.tar -C /usr/local
    
    chmod -R 777 /usr/local/node-v14.18.1-linux-x64/bin/node
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    Git环境

    • 安装
    sudo apt install git
    git --version
    
    • 1
    • 2
    • 配置 ssh
    step1:
        git config --global user.name "WangHaiOu"
        git config --global user.email "wanghaiou888888@126.com"
    
    step2:
         cd ~; ls  =》查看家目录下是否有.ssh目录,如果下面命令会自动生成一个,
         特别说明 这个目录是不git 专用目录,而是 用户 密钥 的存储目录。
    
         ssh-keygen -t rsa -C "wanghaiou888888@126.com"   一路按回车
    
    step3:
        进入.ssh目录你会看到两个文件id_rsa和id_rsa.pub,
        d_rsa是私钥,id_rsa.pub自然就是公钥啦,
        然后我们需要做的就是把id_rsa.pub文件中的内容拷贝一下
    
    step4:
        进入你自己的github,进入Settings->SSH and GPG keys->New SSH key,
        然后在Key那栏下面将第四步拷贝的东西粘贴进去就可以了,最后点击 Add SSH key按钮添加。
        (如果之前有配置过的公匙,先删掉,再将新的复制进去)
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19

    Visual Studio Code 环境

    找到 设置 中的 同步设置, 然后 登录GitHub后就可以自动更新了

    • 扩展列表
    Auto Rename Tag
    Chinese (Simplified) (简体中文)
    Live Server
    Markdown All in One
    
    Go
    
    Python
    Python Indent
    Python Preview
    
    Remote Development
    Remote-WSL
    Remote-Containers
    Remote-SSH
    Remote - SSH: Editing Configuration Files
    
    Settings Sync
    
    Vetur
    Vue Language Features
    
    vscode-proto3
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 代码片段
      go.json
    {
    	"console": {
    		"prefix": "fln",
    		"body": "fmt.Println($1)"
    	},
    	"detail": {
    		"prefix": "ff",
    		"body": "fmt.Printf(\"%T---%+v\\n\", $1,$1)"
    	},
    	"ee": {
    		"prefix": "ee",
    		"body": "if err != nil {\n    fmt.Println(err) \n}"
    	},
    	"rr": {
    		"prefix": "rr",
    		"body": "if err != nil {\n    err := fmt.Errorf(\"$1异常:%v\", err)\n    tools.Failed(that.Ctx, err.Error()) \n    return\n}"
    	},
    	"jj": {
    		"prefix": "jj",
    		"body": "err := json.Unmarshal(that.Ctx.Input.RequestBody, &inData)\nif err != nil {\n    tools.Failed(that.Ctx, \"请求参数异常\" + err.Error())\n    return\n}\nerr = tools.Check.Struct(inData)\nif err != nil {\n    tools.Failed(that.Ctx, err.Error())\n    return\n}"
    	},
    	"inData": {
    		"prefix": "inData",
    		"body": "inData := struct{\n    $1\n}{}\nerr := json.Unmarshal(that.Ctx.Input.RequestBody, &inData)\nif err != nil {\n    tools.Failed(that.Ctx, \"请求参数异常\" + err.Error())\n    return\n}\nerr = tools.Check.Struct(inData)\nif err != nil {\n    tools.Failed(that.Ctx, err.Error())\n    return\n}"
    	},
    	"debug": {
    		"prefix": "dd",
    		"body": "tools.Failed(that.Ctx, $1)\nreturn"
    	},
    	"wer": {
    		"prefix": "ss",
    		"body": "err := fmt.Errorf(\"$1异常:%v\", err)"
    	},
    	"tt": {
    		"prefix": "tt",
    		"body": "tools.Success(that.Ctx, \"操作完成\")"
    	}
    
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39

    javascript.json

    {
    	"ccc": {
    		"prefix": "ccc",
    		"body": "console.log($1)"
    	},
    	"cr": {
    		"prefix": "cr",
    		"body": "console.error($1)"
    	},
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 快捷键
    1、上复制 Alt + Shift + up
    2、上移动 Alt + Caps + up
    3、下复制 Alt + Shift +down
    4、下移动 Alt + Caps +down
    5、格式化文档 Alt + Shift  + f
    6、全部保存 Alt + Ctrl + s
    7、折叠一级单元: Alt + Ctrl+Win+ -
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    atom

    wget https://npm.taobao.org/mirrors/atom/1.9.8/atom-amd64.deb
    
    • 1

    说明:

    安装成功后自带的包管理工具 apm,
    且 apm的 插件安装源 被 自动替换成了 淘宝了,而不是原始的国外源

    • apm 常用命令
    apm config get registry # 获取apm的安装源
    apm config set registry # 设置
    apm config list # 查看配置列表
    
    # 查找插件
    apm search simplified-chinese-menu
    # 安装插件: Installing simplified-chinese-menu to /home/hero/.atom/packages ✓
    apm install simplified-chinese-menu
    # 删除
    apm remove simplified-chinese-menu
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10

    Docker环境

    • Mysql
    • Redis
    • ESearch
    • 等等

    其他常用软件

    • DBeaver
    • postman
    • wps
    • 谷歌(导入书签)
    • 微信
    • 钉钉
    • NxShell
  • 相关阅读:
    数据资产管理解决方案:构建高效、安全的数据生态体系
    【软考学习7】数据校验——海明校验码、循环校验码、奇偶校验码
    JAVA小游戏 “拼图”
    用Numba:一行代码将Python程序运行速度提升100倍
    ESP32 之 ESP-IDF 教学(十八)—— 组件配置(KConfig)
    四舍五入(基础语法)
    【C++笔记】C++三大特性之多态的概念、定义及使用
    使用go的并发性来解决Hilbert酒店问题
    Scala基础入门
    数据结构刷题:第十三天
  • 原文地址:https://blog.csdn.net/weixin_45541665/article/details/125889114