↓ Skip to main content
  1. Tags/

Linux

2026

从进程视角重新理解 Docker

·3809 words·8 mins
起因 # 第一次接触 Docker 是 2017 年,在深圳网警机房驻场做审核项目。机房完全没有外网,模型、依赖、运行环境全靠 U 盘拷贝 docker image 来传输。后来做模型转换系统,再到量化行业负责机器学习平台,和 Docker、K8s 打了不少交道。但距离上一次系统梳理 namespace、cgroup 这些底层机制,已经过去好几年了。

2020

thinkpad t430 manjaro系统安装nvidia驱动

·336 words·1 min
前几天装驱动把笔记本搞崩溃了..重新装了kde桌面环境的manjaro 首先根据 Configure NVIDIA (non-free) settings and load them on Startup 直接装驱动。 装之后mhwd -li命令会显示新安装的驱动,带有nvidia字样的。

2018

linux 下C++ 连接mysql 数据库

·243 words·1 min
资料推荐这个:MySQL C API programming tutorial 环境为ubuntu 14.04 lts 需要安装mysql 和mysql 开发包 sudo apt-get install libmysqlclient15-dev mysql-server mysql-client 先在mysql 中建立test数据库和test表格 mysql>create database test; mysql>use test; //切换到test数据库中 mysql> create table test(name varchar(255),num int(10) ); //创建一个叫test的表 mysql>show create table test; //显示刚才创建的表信息 mysql> select * from test; //查询test表中数据 mysql>quit 然后用如下cpp代码连接

linux 下 .o 文件,.a 文件,.so 文件

·198 words·1 min
发现我对工程一无所知 QAQ。 参考资料: Library Archives: Static and Dynamic 简单地说,.a 文件是静态库,而 .so 文件是共享对象(动态库),作用类似 Windows 下的 DLL。 .o 文件则相当于 Windows 下的 .obj 文件。编译器通常先把各个源文件编译为目标文件,再将它们链接成最终的可执行文件。

2017

archlinux安装记

·167 words·1 min
实在不忍心x1c吃灰。。。 打算装个arch玩。。。 第一次失败了,原因是忘记配置引导相关… 第二次就成功了… 教程满大街都是就不再写了….

ubuntu 包管理(apt-get)损坏的解决办法

·287 words·1 min
症状是不管安装什么,都会说有一大堆依赖无法安装。。。 大概是: a depends b[i],but b[i] is not be installed. (b==0..n) 最后会提示Unable to correct problems, you have held broken packages 解决办法:用synaptic工具,把可能存在问题的包都清除掉。

AWK 初探

·2989 words·6 mins
参考资料: awk_维基百科 awk简明教程 awk是一门比较古老但是很好用的文本处理工具(语言?) 语法还是很好懂的。。转载了一篇文章,算是简明手册?不过台词有点糟糕 orz 有一些网友看了前两天的《Linux下应该知道的技巧》希望我能教教他们用awk和sed,所以,出现了这篇文章。我估计这些80后的年轻朋友可能对awk/sed这类上古神器有点陌生了,所以需要我这个老家伙来炒炒冷饭。况且,AWK是贝尔实验室1977年搞出来的文本处理神器,今年是蛇年,是AWK的本命年,而且年纪和我相仿,所以非常有必要为他写篇文章。 之所以叫AWK是因为其取了三位创始人 Alfred Aho,Peter Weinberger, 和 Brian Kernighan 的Family Name的首字符。要学AWK,就得提一提AWK的一本相当经典的书《The AWK Programming Language》,它在豆瓣上的评分是9.4分!在亚马逊上居然卖1022.30元。

Linux 下各个目录的作用及内容

·2481 words·5 mins
参考:FHS(Filesystem Hierarchy Standard) 其实这东西虽然有一个统一的标准,但是不同发行版,或者同一个发行版的不同版本,差异貌似都蛮大的。所以这里只是理论上各个目录的作用,可能和具体的发行版不符。。

2016

manjaro安(zhe)装(teng)记

·730 words·2 mins
噫。。之前x200上装的是win7+fedora25 gnome。。。 虽然感觉gnome对于09年的老电脑来说有点吃力…不过也懒得换.. 结果硬盘挂了2333 于是换了块硬盘

geekos project 1 (ELF文件相关)

·987 words·2 mins
一、目的 熟悉 ELF 文件格式,了解 GeekOS 系统如何将 ELF 格式的可执行程序装入到内存,建立内核进程并运行的实现技术。 二、流程 1、修改 /geekos/elf.c 文件:在函数 Parse_ELF_Executable( ) 中添加代码,分析 ELF 格式的可执行文件(包括分析得出 ELF 文件头、程序头,获取可执行文件长度,代码段、数据段等信息),并填充 Exe_Format 数据结构中的域值。 2、在 Linux 环境下编译系统得到 GeekOS 镜像文件。 3、编写一个相应的 bochs 配置文件。 4、在 bochs 中运行 GeekOS 系统显示结果。

2015

atom在linux下安装插件失败的解决方案

·272 words·1 min
1gyp info it worked if it ends with ok 2gyp info using node-gyp@2.0.2 3gyp info using node@0.10.40 | linux | x64 4gyp http GET https://atom.io/download/atom-shell/v0.34.0/node-v0.34.0.tar.gz 5gyp WARN install got an error, rolling back install 6gyp ERR! install error 7gyp ERR! stack Error: This is most likely not a problem with node-gyp or the package itself and 8gyp ERR! stack is related to network connectivity. In most cases you are behind a proxy or have bad 9gyp ERR! stack network settings. 10gyp ERR! stack at Request.<anonymous> (/opt/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/install.js:234:21) 11gyp ERR! stack at Request.emit (events.js:95:17) 12gyp ERR! stack at Request.onRequestError (/opt/atom/resources/app/apm/node_modules/npm/node_modules/request/request.js:861:8) 13gyp ERR! stack at ClientRequest.emit (events.js:95:17) 14gyp ERR! stack at Socket.socketErrorListener (http.js:1548:9) 15gyp ERR! stack at Socket.emit (events.js:95:17) 16gyp ERR! stack at net.js:834:16 17gyp ERR! stack at process._tickCallback (node.js:448:13) 18gyp ERR! System Linux 3.16.0-38-generic 19gyp ERR! command "/opt/atom/resources/app/apm/bin/node" "/opt/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "install" "--target=0.34.0" "--dist-url=https://atom.io/download/atom-shell" "--arch=x64" "--ensure" 20gyp ERR! cwd /home/rkz2013/.atom 21gyp ERR! node -v v0.10.40 22gyp ERR! node-gyp -v v2.0.2 23gyp ERR! not ok 解决办法是不用apm install 而是用npm install…之前要安装一个npm