{"id":28043022,"url":"https://github.com/sshpc/s","last_synced_at":"2026-04-28T18:07:44.397Z","repository":{"id":290324277,"uuid":"968513356","full_name":"sshpc/s","owner":"sshpc","description":"交互式shell脚本工具 initsh项目重构版","archived":false,"fork":false,"pushed_at":"2025-05-06T05:44:43.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T06:43:30.374Z","etag":null,"topics":["dev","linux","sh","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sshpc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-18T08:04:40.000Z","updated_at":"2025-05-06T05:44:46.000Z","dependencies_parsed_at":"2025-04-28T08:38:49.520Z","dependency_job_id":null,"html_url":"https://github.com/sshpc/s","commit_stats":null,"previous_names":["sshpc/s"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshpc%2Fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshpc%2Fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshpc%2Fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshpc%2Fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sshpc","download_url":"https://codeload.github.com/sshpc/s/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253591622,"owners_count":21932877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dev","linux","sh","shell"],"created_at":"2025-05-11T15:36:16.268Z","updated_at":"2026-04-28T18:07:44.392Z","avatar_url":"https://github.com/sshpc.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 交互式shell脚本工具\n\u003e Debian系\n## 示例\n\n```sh\n\u003e ---  当前目录: [ /root ] ---- \u003c v:xxx\n\n当前菜单: 首页 \n\n1: 软件管理           2: 网络管理\n\n3: 系统管理           4: docker管理\n\n5: 磁盘管理           6: 文件管理\n\n7: 其他工具           \n\n0: 首页 b: 返回 q: 退出 s:脚本设置\n\n请输入命令号(0-8): \n\n```\n\n\n## 安装\n\n\u003e root 用户\n\n### 一键安装(推荐)\n\n\n```sh\nwget -N  http://raw.githubusercontent.com/sshpc/s/main/s.sh \u0026\u0026 chmod +x s.sh \u0026\u0026  bash s.sh\n```\n\n\u003e 再次执行只需要输入 “s” \n\n```sh\n root@server:~#  s\n```\n\n国内加速链接\n```sh\nwget -N  https://gh.ddlc.top/http://raw.githubusercontent.com/sshpc/s/main/s.sh \u0026\u0026 chmod +x s.sh \u0026\u0026  bash s.sh\n```\n```sh\nwget -N  https://gh-proxy.com/http://raw.githubusercontent.com/sshpc/s/main/s.sh \u0026\u0026 chmod +x s.sh \u0026\u0026  bash s.sh\n```\n```sh\nwget -N  https://edgeone.gh-proxy.com/http://raw.githubusercontent.com/sshpc/s/main/s.sh \u0026\u0026 chmod +x s.sh \u0026\u0026  bash s.sh\n```\n## 说明\n\n\n\n新增参数模式 可传入多个函数参数，从而不进入交互操作直接执行\n\u003e自定义执行命令 自行查看脚本结构 (避免_exists slog 等内部工具函数、无意义、无效函数执行)\n\n### 示例\n\n#### 查看系统信息\n\ns statusfun sysinfo\n\n输出\n```sh\n CPU Model          : QEMU Virtual CPU version 2.5+\n CPU Cores          : 2 @ 3695.986 MHz\n CPU Cache          : 16.0 MB\n AES-NI             : Enabled\n VM-x/AMD-V         : Disabled\n Total Disk         : 104.0 GB (35.4 GB Used)\n Total Mem          : 1.9 GB (1.6 GB Used)\n Total Swap         : 6.2 GB (863.4 MB Used)\n System uptime      : 19 days, 21 hour 3 min\n OS                 : Ubuntu 24.04.1 LTS\n Arch               : x86_64 (64 Bit)\n Kernel             : 6.8.0-71-generic\n TCP CC             : cubic\n Virtualization     : KVM\n```\n#### 查看docker状态\n\ns dockerfun dockerstatusfun\n\n输出\n```sh\n基本信息\n运行中/共: 6/7 网络: 9 | 卷: 0\ndocker端口映射   \n主机端口 3307 -\u003e 容器端口 3306/tcp  [mysql2]    \n主机端口 3306 -\u003e 容器端口 3306/tcp  [mysql]    \n主机端口 3001 -\u003e 容器端口 3001/tcp  [uptime-kuma_uptime-kuma_1]    \n\ncompose情况\n当前目录没有 docker-compose.yml 文件\n\n容器情况\nruning\nCONTAINER ID   IMAGE                    COMMAND                  CREATED        STATUS                 PORTS                               NAMES\nee33fe9234c9   mysql:5.7                \"docker-entrypoint.s…\"   2 weeks ago    Up 2 hours             0.0.0.0:3306-\u003e3306/tcp, 33060/tcp   mysql\n0646cd7b59a6   mysql:5.7                \"docker-entrypoint.s…\"   2 weeks ago    Up 27 hours            33060/tcp, 0.0.0.0:3307-\u003e3306/tcp   mysql2\nb2097aaaf448   louislam/uptime-kuma:1   \"/usr/bin/dumb-init …\"   8 weeks ago    Up 2 weeks (healthy)   0.0.0.0:3001-\u003e3001/tcp              uptime-kuma_uptime-kuma_1\n\n```\n\n#### 重启容器\n\ns dockerfun restartcontainer\n\n输出\n```sh\n当前正在运行的容器：\n\n序号    容器名称  容器ID         容器状态\n1       mysql                       ee33fe9234c9   Up 2 hours\n2       mysql2                      0646cd7b59a6   Up 27 hours\n\n请输入要重启的容器序号（从 1 开始）： 1\n正在重启容器：1\n[ | ] loading ...ee33fe9234c9\n已重启\n```\n\n\n#### 批量导出已使用的镜像到/home/img 目录\n\ns dockerfun dockerimageimportexport  dockerimageexportuseall\n\n\n#### 批量从/home/img 目录导入全部镜像\n\ns dockerfun dockerimageimportexport  dockerimageimportall\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshpc%2Fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshpc%2Fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshpc%2Fs/lists"}