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
相关推荐
qq_3384323715 小时前
VS Code 远程 WSL 中 Claude Code 导致 Java 文件修改被自动撤回的一次排查
vscode·vibe coding·claude code
Ycocol17 小时前
AS同一个目录下的类导入导入其他类爆红无法跳转但是可以编译
android·ide·android studio
AI行业学习18 小时前
CC‑Switch v3.16.1 免费下载(Windows+macOS+Linux)、使用方法【2026.6.11】
linux·开发语言·windows·python·macos·前端框架·html
一个人旅程~19 小时前
如何进行win11右键菜单优化(poweshell命令行与bat自动脚本方式)
windows·经验分享·macos·电脑
坏小虎19 小时前
macOS 安装 Ghostty 终端完整教程:环境、依赖与美化配置
macos·策略模式
麦麦麦当劳大王19 小时前
OpenClaw安装部署(Windows/Linux/MacOS)
linux·windows·macos
会Tk矩阵群控的小木20 小时前
独立站tk矩阵系统站外引流实战:多账号管理+风控+数据分析代码实现
运维·macos·自动化·个人开发·tk矩阵
console.log('npc')20 小时前
FigmaEX 汉化,免费使用,下载与安装指南(Windows/Mac)
windows·macos·ui·figma
云水-禅心20 小时前
解决MacOS 安装Python之后默认版本指向不正确问题
开发语言·python·macos
Mars-xq21 小时前
vscode 开发Android
android·ide·vscode