
linux 工具
天麓
很懒的码农
展开
-
ntp自动同步时间 ubuntu入门之二十四
当我们的电脑的CMOS电池失效时,我们可以在登陆shell之后通过脚本自动同步ntp时间。首先是该目录是内存临时目录,关机后该文件会消失,重新开机重新生成该文件。用户可以根据自己的df显示的tmpfs情况设置自己的文件路径。其次,该文件我的用户user可读可写,不需要root权限。Ubuntu如何同步网络时间。原创 2024-06-27 09:54:26 · 386 阅读 · 0 评论 -
wine的使用 ubuntu入门之二十三
在ubuntu22.04中安装及使用wine。手工生成如下文件,内容入选。原创 2024-05-31 14:47:10 · 624 阅读 · 0 评论 -
vscode的使用 ubuntu入门之二十二
高亮标识符,变量或者函数可以用 rainbow-highlighter 这个插件。在VSCode中如何高亮显示变量。原创 2024-05-29 08:48:49 · 358 阅读 · 0 评论 -
设置锁屏 ubuntu入门之二十一
ubuntu如何锁屏不停止工作。原创 2024-05-27 19:07:45 · 220 阅读 · 0 评论 -
慢慢欣赏 ftrace (二)进程和中断状态填充方法
【代码】慢慢欣赏 ftrace (二)进程和中断状态填充方法。原创 2024-01-09 18:57:54 · 448 阅读 · 0 评论 -
慢慢欣赏 ftrace (一)找到解析function对应字段的函数
对于5.10内核,我们找到其对应函数 trace_print_context,该函数可以仔细研读。分析ftrace的时候,有时会对其字段部分不了解,有些字段解析的不清晰,例如D和~原创 2024-01-03 10:22:42 · 467 阅读 · 0 评论 -
配置samba服务 ubuntu入门之十八
配置samba服务原创 2023-03-10 09:30:21 · 679 阅读 · 1 评论 -
bcc安装过程以及遇到的问题
bcc原创 2022-09-16 17:17:42 · 2781 阅读 · 0 评论 -
慢慢欣赏linux cpupower编译
cpupower编译原创 2022-07-14 19:20:28 · 494 阅读 · 0 评论 -
查看软中断变化情况 linux性能优化学习之二
watch -d "/bin/cat /proc/softirqs | /usr/bin/awk 'NR == 1{printf \"%-15s %-15s %-15s %-15s %-15s\n\",\" \",\$1,\$2,\$3,\$4}; NR > 1{printf \"%-15s %-15s %-15s %-15s %-15s\n\",\$1,\$2,\$3,\$4,\$5}'"结果Every 2.0s: /bin/cat /proc/softirqs | /usr/bin/a.原创 2022-05-29 06:54:25 · 456 阅读 · 0 评论 -
子进程频繁创建 linux性能优化学习之一
首先实用sar运行测试程序之前# sar -w 2Linux 5.4.0-26-generic (rlk) 2022年05月28日 _x86_64_ (4 CPU)06时13分05秒 proc/s cswch/s06时13分07秒 0.00 211.5006时13分09秒 0.00 257.5006时13分11秒 0.00 230.0006时13分13秒 0.00 175.50运行测试程序原创 2022-05-28 06:46:27 · 238 阅读 · 0 评论 -
切换超级用户 ubuntu入门之十五
rlk@rlk:~$ sudo su rootroot@rlk:/home/rlk# lsDesktop Documents Downloads DS-5-Workspace eclipse-workspace Music Pictures Public rlk share snap Templates tools VideosUbuntu超级用户切换的方法找了很多天才发现的原创 2022-05-25 16:08:07 · 249 阅读 · 0 评论 -
使用lshw ubuntu入门之十四
# apt install lshw Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: lshw 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 232 k.原创 2022-03-17 15:21:28 · 756 阅读 · 0 评论 -
使用gdm3 ubuntu入门之十三
Ubuntu有时桌面有问题,可以排查是否时gdm3导致重新启动# systemctl status gdm3 gdm.service - GNOME Display Manager Loaded: loaded (/lib/systemd/system/gdm.service; static; vendor preset: en> Active: inactive (dead)重新启动# systemctl start gdm3...原创 2022-02-28 17:34:43 · 4369 阅读 · 0 评论 -
安装libtoolize ubuntu入门之十二
安装xenomai3.1上报如下错误rlk@ubuntu:xenomai-3.1$ ./scripts/bootstrap prepare-kernel.sh wrap-link.sh rlk@ubuntu:xenomai-3.1$ ./scripts/bootstrap Can't exec "libtoolize": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm l原创 2022-01-30 18:26:37 · 6961 阅读 · 1 评论 -
安装和使用apt-show-versions ubuntu入门之十一
查看软件包版本号的工具安装方法如下,遇到如下错误的时候首先解决错误rlk@ubuntu:~$ sudo apt-get install apt-show-versionsE: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the administration directory (/var/lib/dpkg/), is another pr原创 2022-01-30 06:54:49 · 1753 阅读 · 0 评论 -
添加sudo用户 ubuntu入门之十
使用forest用户通过ssh登陆设备之后,使用sudo命令失败forest$ sudo cat /etc/sudoers[sudo] password for forest: forest is not in the sudoers file. This incident will be reported.解决方法:在console串口界面 root ALL=(ALL:ALL) ALL 后面增加一行 forest ALL=(ALL:ALL) ALLroot# sudo...原创 2021-12-14 16:37:54 · 803 阅读 · 0 评论 -
Ubuntu虚拟机无法ping通windows解决办法 Ubuntu入门之九
rlk@ubuntu:~$ ping 192.168.119.1 // 无法ping通windows10PING 192.168.119.1 (192.168.119.1) 56(84) bytes of data.^C--- 192.168.119.1 ping statistics ---18 packets transmitted, 0 received, 100% packet loss, time 17398msrlk@ubuntu:~$ ping www.sina.com.cn /.原创 2021-12-01 22:20:28 · 1987 阅读 · 0 评论 -
ifconfig的安装和使用 Ubuntu入门之八
rlk@ubuntu:~$ ifconfigCommand 'ifconfig' not found, but can be installed with:sudo apt install net-toolsrlk@ubuntu:~$ sudo apt install net-tools[sudo] password for rlk: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unav.原创 2021-12-01 22:08:42 · 1575 阅读 · 0 评论 -
ftrace学习-以gpio为例
关于ftrace,下面这篇文章写得比较好 https://www.ibm.com/developerworks/cn/linux/l-cn-ftrace2/linux知识库 http://lib.youkuaiyun.com/base/linuxlinux那些事作者的blog http://blog.youkuaiyun.com/fudan_abc原创 2017-08-11 07:14:39 · 805 阅读 · 0 评论 -
strace的使用 Ubuntu入门之七
安装# sudo apt-get install strace -yReading package lists... DoneBuilding dependency tree Reading state information... DoneThe following NEW packages will be installed: strace0 upgraded, 1 newly installed, 0 to remove and 351 not upgraded.Ne原创 2021-11-16 19:04:43 · 741 阅读 · 0 评论 -
慢慢欣赏linux之串口驱动代码分析 串口与tty挂接方法
getty -L ttyAMA0 115200 vt100需要strace和ftrace分析一下流程参考文档1 gettyhttps://wiki.debian.org/getty2 Linux getty命令https://www.runoob.com/linux/linux-comm-getty.html原创 2021-11-06 07:19:03 · 1038 阅读 · 0 评论 -
meld的使用 Ubuntu入门之六
$ sudo apt install meld正在读取软件包列表... 完成正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: libm17n-0 libotf0 m17n-db xaw3dg使用'sudo apt autoremove'来卸载它(它们)。将会同时安装下列软件: gir1.2-gtksource-3.0 libgtksourceview-3.0-1 libgtksourceview-3.0-commo...原创 2021-09-16 11:03:07 · 1623 阅读 · 0 评论 -
linux timerfd系列函数学习笔记1 获取电脑从启动到当前的运行时间
C码获取电脑从启动到当前的运行时间#include <stdlib.h>#include <math.h>#include <stdio.h>#include <errno.h>#include <error.h>#include <sys/timerfd.h>int main(int argc, char *argv[]){ int err; struct timespec expected; int原创 2021-09-13 15:00:40 · 150 阅读 · 0 评论 -
minicom的使用 Ubuntu入门之五
下载minicomsudo apt install minicom打开minicomsudo minicom -s参考文档minicom退出方法https://blog.youkuaiyun.com/jhyworkspace/article/details/53572284原创 2021-09-09 09:31:41 · 88 阅读 · 0 评论 -
锁屏方法 ubuntu入门之四
$ sudo apt install xtrlock正在读取软件包列表... 完成正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: gsfonts imagemagick-6-common libfftw3-double3 liblqr-1-0 libm17n-0 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libotf0 m17n-db xaw3dg使用'sudo apt a...原创 2021-09-08 18:57:02 · 1476 阅读 · 0 评论 -
stress工具的安装和使用
$ sudo apt-get install stress正在读取软件包列表... 完成正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: gsfonts imagemagick-6-common libfftw3-double3 liblqr-1-0 libm17n-0 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libotf0 m17n-db xaw3dg使用'sudo ap...原创 2021-09-08 16:04:32 · 1969 阅读 · 0 评论 -
问题定位 uboot下无法ping通tftpserver
现象 单板启动, uboot进入命令行模式, 无法ping通tftpserver #ping 10.100.10.111 Speed: 100, full duplex Using ethernet@xxx device ARP Retry count exceeded; starting again ping failed; host 10.100.10.111 is not alive定位过程 1 交叉对比实验,发现同事的电脑能够ping通,并且...原创 2021-09-08 09:44:52 · 1611 阅读 · 0 评论 -
查看网关的方法 ubuntu入门之三
$ route -n内核 IP 路由表目标 网关 子网掩码 标志 跃点 引用 使用 接口0.0.0.0 1x.1x.x0.2x4 0.0.0.0 UG 100 0 0 enpxsy方法2$traceroute www.baidu.comtraceroute to www.baidu.com (220.181.38.150), 30 hops max, 60 by...原创 2021-09-07 18:19:59 · 852 阅读 · 0 评论 -
yocto学习
怎么开始学习yocto?https://zhuanlan.zhihu.com/p/67453665原创 2021-09-07 15:10:12 · 120 阅读 · 0 评论 -
网络配置 Ubuntu入门之二
ifconfig -a 可以查看Ubuntu查看IP信息的两种方式https://blog.youkuaiyun.com/sqhren626232/article/details/87707190原创 2021-09-06 22:48:07 · 331 阅读 · 0 评论 -
中文输入法配置 Ubuntu入门之一
参考如下配置可以很容易配置中文输入法中英文切换方法 windows键+空格最好的办法是切换到中文输入法后, 通过shift键切换中英文中文输入法配置 Ubuntu入门之一https://blog.youkuaiyun.com/nanhuaibeian/article/details/85851335...原创 2021-09-06 22:39:06 · 106 阅读 · 0 评论 -
ubuntu寻找软件源的方法
https://blog.youkuaiyun.com/rchm8519/article/details/48358249原创 2021-04-10 07:24:38 · 743 阅读 · 0 评论 -
Ubuntu进入root的方式
Ubuntu进入root的方式:rlk@ubuntu:~$ sudo su[sudo] password for rlk:root@ubuntu:rlk# lsbin Desktop Documents Downloads eclipse-workspace Music Pictures Public rlk_basic Templates Videos 模板原创 2021-04-08 06:38:56 · 938 阅读 · 0 评论 -
慢慢欣赏linux vsftpd的使用
linux下FTP拒绝(ftp: connect: Connection refused)https://blog.youkuaiyun.com/bamuta/article/details/7448121vsftp:425 failed to establish connection解决办法https://blog.youkuaiyun.com/sun120204535/article/details/72865865原创 2021-02-13 10:26:50 · 192 阅读 · 0 评论