ramlife

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  linux

摘要:终端 ctrl + alt + t 打开终端 切换 root sudo -i 换源 sudo sed -i.bak -r 's/(archive|security).ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list 参考 [htt 阅读全文
posted @ 2024-12-20 15:36 ramlife 阅读(23) 评论(0) 推荐(0)

摘要:创建许可文件 先使用 ssh-keygen -t rsa 来生成 .ssh 目录,然后把生成的密钥下载到本地,并在 .ssh 下创建一个空文件 authorized_keys。 录入公钥 使用 vim 打开 authorized_keys,并把允许登录电脑生成的公钥复制进去,一行就是一个许可的公钥。 阅读全文
posted @ 2023-01-30 21:07 ramlife 阅读(2439) 评论(0) 推荐(1)

摘要:设置 注意下面的端口换成自己对应的端口。 sudo snap set system proxy.https="http://127.0.0.1:8889" sudo snap set system proxy.http="http://127.0.0.1:8889" 参考: ubuntu snap 阅读全文
posted @ 2023-01-17 18:02 ramlife 阅读(327) 评论(0) 推荐(0)

摘要:服务端 安装 nfs sudo apt-get install nfs-kernel-server netstat 修改配置文件 sudo vim /etc/exports /home/xxx ×(ro,sync,no_subtree_check) 重启服务 sudo /etc/init.d/nfs 阅读全文
posted @ 2023-01-16 09:57 ramlife 阅读(469) 评论(0) 推荐(0)

摘要:转自: https://www.cnblogs.com/minico/p/7702020.htm 阅读全文
posted @ 2022-09-15 16:00 ramlife 阅读(25) 评论(0) 推荐(0)

摘要:使用 ifconfig 查看网络状态 /etc/network/interfaces 修改一般配置 /etc/resolv.conf 修改 dns 重启网络服务 sudo /etc/init.d/networking restart 或者 sudo service networking restar 阅读全文
posted @ 2022-09-15 09:30 ramlife 阅读(534) 评论(0) 推荐(0)

摘要:pgid 是组 pid,等于组首领 pid sid 是 session id, 等于 session 首领 pid. session 主要是和终端相关,同一个终端启动的进程属于同一个 session。 ps j, ps -j, ps axj, ps -efj 都可以查看 pgid 和 sid. 互相 阅读全文
posted @ 2022-09-13 16:47 ramlife 阅读(631) 评论(0) 推荐(0)

摘要:debian 1. useradd -m xyz m 表示在 home 下创建相应的用户目录。 2. passwd xyz 3. usermod -a -G wheel xyz 如果出现错误提示,那么需要 usermod: group 'wheel' does not exist, 需要 addgr 阅读全文
posted @ 2021-03-08 16:03 ramlife 阅读(4567) 评论(0) 推荐(0)

摘要:今天碰到一个情况,分辨率太大,导致左下角的菜单显示不出来,无法调整分辨率。 cd /usr/share/applications sudo lxrandr 就可以运行分辨率设置的程序了。 阅读全文
posted @ 2020-12-22 16:31 ramlife 阅读(709) 评论(0) 推荐(0)

摘要:python 中 需要使用 messagequeue 需要 import posix_ipc,然后才能用。 python 版本的 messagequeue 是对 C 版本的封装。 具体参考: http://semanchuk.com/philip/posix_ipc/#message_queue 阅读全文
posted @ 2020-12-14 11:34 ramlife 阅读(179) 评论(0) 推荐(0)

摘要:两种方法: 1. 启动的时候,使用命令启动 LC_CTYPE=zh_CN.UTF-8 emacs $@ 2. 设置 bashrc LC_CTYPE = zh_CN.utf8 或者 UTF-8 参考: https://www.douban.com/group/topic/29718313/ 阅读全文
posted @ 2020-12-11 13:43 ramlife 阅读(192) 评论(0) 推荐(0)

摘要:samba 共享的文件,被修改后,会被增加执行位。 要保留原来的属性,只需要修改 /etc/samba/smb.conf [global] ...... map archive = no 参考: https://stackoverflow.com/questions/20958888/preserv 阅读全文
posted @ 2020-12-08 16:06 ramlife 阅读(278) 评论(0) 推荐(0)

摘要:使用 feh 命令 feh --magick-timeout 1 /mnt/speech/speech/assets/ico-录音.svg 也有说法是 --magick-timeout 在新版本被废弃了,使用 --conversion-timeout 参考: https://superuser.co 阅读全文
posted @ 2020-12-08 13:41 ramlife 阅读(1072) 评论(0) 推荐(0)

摘要:1. 修改软连接 ln –snf /opt/apps/redis-5.0.4 /usr/local/redis 注意: 源、目标文件/目录都不要在后面加”/”,重要的事情说三遍,原因自行度娘/Google 参考: https://www.jianshu.com/p/946b48a13a01 阅读全文
posted @ 2020-12-07 10:37 ramlife 阅读(4623) 评论(0) 推荐(0)

摘要:找到可以参考的资料就两个,一个是 firefly, 一个是 pine64。 https://github.com/54shady/kernel_drivers_examples/tree/Firefly_RK3399 阅读全文
posted @ 2020-12-03 14:48 ramlife 阅读(74) 评论(0) 推荐(0)

摘要:1. sudo apt search fcitx sudo apt install fcitx-pinyin 2. 设置 bashrc vim ~/.bashrc export XMODIFIERS="@im=fcitx" 3. 右上角的 input methord 点击 configure ,就可 阅读全文
posted @ 2020-11-27 16:18 ramlife 阅读(215) 评论(0) 推荐(0)

摘要:1. 我需要把 ubuntu 按键进行互换映射 原功能 目标功能 caps lctrl lctrl return return rctrl rctrl caps sudo vim /usr/share/X11/xkb/keycodes/evdev <RTRN> = 37; <CAPS> = 105; 阅读全文
posted @ 2020-11-24 11:56 ramlife 阅读(253) 评论(0) 推荐(0)

摘要:grep -rl 'search' ./ --exclude-dir={\environments,\cache} --exclude=*.{bak~,bak} 参考: https://blog.csdn.net/Liuboxx1/article/details/85330320 阅读全文
posted @ 2020-11-05 16:37 ramlife 阅读(306) 评论(0) 推荐(0)

摘要:git 生成 ssh key,执行下面代码即可: git config --global --list git config --global user.name "这里换上你的用户名" git config --global user.email "这里换上你的邮箱" ssh-keygen -t 阅读全文
posted @ 2020-10-12 14:44 ramlife 阅读(157) 评论(0) 推荐(0)

摘要:只需要修改 CMakeLists.txt,增加下面的属性即可。 set(CMAKE_CXX_FLAGS "-Wno-error=deprecated-declarations -Wno-deprecated-declarations ") 阅读全文
posted @ 2020-09-27 17:55 ramlife 阅读(4099) 评论(0) 推荐(0)