ubuntu22-安装vscode-配置shell命令环境-mac安装

文章目录

1.安装vscode

从官网下载安装包Code_1.93.1-1726079302_amd64.deb。

在ubuntu系统中,安装包所在目录打开命令行工具,输入:

bash 复制代码
udo dpkg -i code_1.93.1-1726079302_amd64.deb

中间点一个yes。

执行以下命令即可运行VS Code:

bash 复制代码
code

2.修改语言为中文

可以执行,相关文章。
https://plugin.blog.csdn.net/article/details/138569823

3.配置bash调试环境

3.1.安装插件

Bash Debug 调试插件

Shellman格式化插件

shellcheck 语法错误检查

shell-format 右键格式化文档

Code Runner 文档右键运行

3.2.添加配置文件

javascript 复制代码
{
    "workbench.colorTheme": "Default Light Modern",
    "launch": {
        "configurations": [
        {
            "type": "bashdb",
            "request": "launch",
            "terminalKind": "integrated" ,
            "name": "Bash-Debug (simplest configuration)",
            "cwd": "${workspaceFolder}",
            "program": "${file}",
            "args": []
        }
        ]
    }
}

4.调试bash

4.1.新建tmp.sh文件

编辑简单的待打印的内容

bash 复制代码
echo "1"
echo "2"
echo "3"

4.2.运行启动

调试运行。

5.mac安装

bash 复制代码
#!/bin/sh
CopyDirToDst() {
    # echo $1
    dirt=$1
    echo "$dirt"
    dirlan=$(ls "$dirt")
    echo "$dirlan"

    for file in $dirlan; do
        srcfile=$dirt/$file/
        dstdir=$2/$file
        echo "$srcfile" "$dstdir"

        # mkdir $dstdir
        if test -f "$file"; then
            echo "file"
        else
            # 文件夹则复制到目标文件夹 存在则强制替换
            cp -R -f "$srcfile" "$dstdir"
        fi
    done
}
CopyDirToDst ./extension /home/zhiliao/Documents/test

# sudo sh installmac.sh

6.mac卸载

bash 复制代码
#!/bin/sh
uninstall() {
    # echo $1
    dirt=$1
    echo "$dirt"
    dirlan=$(ls "$dirt")
    echo "$dirlan"

    for file in $dirlan; do
        srcfile=$dirt/$file/
        strA=$file
        strB="ZhiLiaoPlugins"
        result=$(echo "$strA" | grep "${strB}")
        # shellcheck disable=SC3010
        if [[ "$result" != "" ]]; then
            echo "delete" "$srcfile"
            rm -R "$srcfile"
        fi        
    done
}
uninstall /home/zhiliao/Documents/test

# sudo sh uninstallmac.sh
相关推荐
技术咖啡馆C1 小时前
二、IDE集成DeepSeek保姆级教学(使用篇)
ide·ai编程·idea-plugin·deepseek
吃汤圆的抹香鲸1 小时前
GoLand 安装包 绿色版 Win,Mac,Linux 包含IntelliJ全家桶 专为Go语言设计的集成开发环境(IDE)
linux·windows·macos·go·intellij-idea·go1.19
吃汤圆的抹香鲸2 小时前
Rider 安装包 绿色版 Win/Mac/Linux 适合.NET和游戏开发者使用 2025全栈开发终极指南:从零配置到企业级实战
linux·运维·windows·sql·游戏·macos·.net
新时代丘鸣山12 小时前
Idea java项目结构介绍
java·ide·intellij-idea
甜于酸13 小时前
MuMu模拟器Pro for Mac 安卓手机平板模拟器
android·macos·智能手机
渔夫阿布13 小时前
在MAC上面通过HomeBrew安装node和npm@指定版本
前端·macos·npm
waicsdn_haha14 小时前
TeX Live 2025 最新版安装与中文环境配置全教程(Windows/Mac/Linux)
linux·windows·macos·论文笔记·sublime text·mdk·嵌入式开发工具
白云千载尽15 小时前
ubuntu环境中安装latex并使用vscode
linux·vscode·ubuntu
亚林瓜子16 小时前
IDEA撤销commit
java·ide·intellij-idea
xinyu39118 小时前
iOS Framework代码中加载图片资源
macos·ios·cocoa