
linux
ztenv
这个作者很懒,什么都没留下…
展开
-
用c/c++实现deflate的压缩
【代码】用c/c++实现deflate的压缩。原创 2024-12-30 15:45:00 · 265 阅读 · 0 评论 -
用c/c++实现gzip压缩
【代码】用c/c++实现gzip压缩。原创 2024-12-30 11:08:32 · 224 阅读 · 0 评论 -
tcpdump Permission denied解决方法大全
【代码】tcpdump Permission denied解决方法大全。原创 2024-12-30 09:30:00 · 382 阅读 · 0 评论 -
How to Generate a Self-Signed Certificate Using OpenSSL?
https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-22-04https://tecadmin.net/step-by-step-guide-to-creating-self-signed-ssl-certificates/https://www.ssldragon.com/how-to/openssl/create-self-s原创 2024-12-23 16:04:10 · 129 阅读 · 0 评论 -
my tmux key bindings
【代码】my tmux key bindings。原创 2024-12-12 14:19:17 · 124 阅读 · 0 评论 -
tmux default keys
bind-key -T prefix C-b send-prefixbind-key -T prefix C-o rotate-windowbind-key -T prefix C-z suspend-clientbind-key -T prefix Space next-layoutbind-key -T prefix ! break-pa原创 2024-12-12 13:48:24 · 232 阅读 · 0 评论 -
通过设置gcc的flags来捕获异常
然后,就可以不使用gdb来调试即可打印堆栈等详细信息了。即可实现运行程序时捕获异常的目的。原创 2024-07-18 16:55:16 · 221 阅读 · 0 评论 -
linux平台方便的获取当前进程名字的几种方法
vim /proc/pid/status #可以获取name。在main函数中使用变量。在main函数中调用。原创 2024-07-18 10:20:54 · 1206 阅读 · 1 评论 -
cpp.snippet for vim-snippet plugin
【代码】cpp.snippet for vim-snippet plugin。原创 2024-06-04 13:52:19 · 163 阅读 · 0 评论 -
Linux用户和用户组的操作
用户,用户组原创 2024-06-04 13:41:10 · 448 阅读 · 0 评论 -
cmake通过PkgConfig查找没有提供cmake的库,并在cmakelists.txt中进行依赖(如:ffmpeg等)
【代码】cmake通过PkgConfig查找没有提供cmake的库,并在cmakelists.txt中进行依赖(如:ffmpeg等)原创 2024-06-02 22:14:58 · 215 阅读 · 0 评论 -
socat创建虚拟串口示例
socatpty2的串口,并向pty2发送数据,从pty1读取数据了,从而达到了模拟串口通讯的目的。此时就可以使用串口的API打开名为。可以看到在home目录下会生成。此时在终端1上就会显示。/socatpty1和。原创 2024-01-20 07:00:00 · 1268 阅读 · 0 评论 -
强大的socat工具,可创建虚拟串口、在串口/网口间转发数据等,基本上无所不能的工具
socat,一个强大的工具,串口工具原创 2024-01-20 06:00:00 · 1671 阅读 · 0 评论 -
ubuntu禁用/启用图形界面
重启ubuntu即时入了ubuntu的文本模式(命令行模式)了。重启ubuntu后即又可以进图形界面了。3、重新恢复到图形界面。原创 2024-01-17 09:58:55 · 2669 阅读 · 0 评论 -
ubuntu 启用core文件
在当前session下执行。原创 2024-01-11 17:46:20 · 1069 阅读 · 0 评论 -
tcpdump
1、定时生成抓包文件。2、解析.cap文件。原创 2023-11-10 14:57:06 · 234 阅读 · 0 评论 -
访问github或其他国外网站有时候很慢,解决方案在这里。
2、按上面的要求配置,并根据自己的需求选择适合自己的内容即可。原创 2023-08-07 12:05:35 · 915 阅读 · 0 评论 -
systemctl 用法大全
【代码】systemctl 用法大全。原创 2023-04-13 12:54:12 · 365 阅读 · 0 评论 -
Linux 防火墙常用命令
The firewall-cmd command enables you to configure firewalld by querying, adding, modifying, and deleting zones and services as desired. Because firewalld is the default firewall service for many Linux distributions, including Red Hat Enterprise Linux and C原创 2023-02-02 23:55:59 · 3077 阅读 · 0 评论 -
How to install MariaDB Connector/C on linux
【代码】How to install MariaDB Connector/C on linux。原创 2023-01-31 15:27:00 · 629 阅读 · 0 评论 -
linux平台下一个好用的并行压缩工具(cpu核数越多越快,比tar -j可以快很多倍)
linux平台一下一个好用的、快速的大文件并行压缩工具原创 2022-09-30 12:53:47 · 1896 阅读 · 0 评论 -
配置或查看linux内核参数
命令sysctl使用方法 sysctl [options] [variable[=value]] [...] sysctl -p [file or regexp] [...]功能描述 sysctl is used to modify kernel parameters at runtime. The parameters available are those listed under /proc/sys/. Procfs is required for sysctl原创 2022-05-07 23:48:13 · 5785 阅读 · 8 评论 -
linux监控工具——atop
ATOP(1) General Commands Manual ATOP(1)NAMEatop - Advanced System & Process MonitorSYNOPSISInteractive Usage原创 2022-04-29 09:24:01 · 2234 阅读 · 0 评论 -
The Linux man-pages
The Linuxman-pagesprojectThe Linuxman-pagesproject documents theLinuxkerneland C library interfaces that are employed by user-space programs. With respect to the C library, the primary focus is theGNUC library (glibc), although, where known, doc...原创 2022-03-16 13:43:31 · 1167 阅读 · 0 评论 -
tcpdump 抓取多个端口的数据包
tcpdump -i ens05 tcp and host xxx.xxx.xxx.xxx and port '(25001 or 25002 or 35005' -vv -w test.cap原创 2022-03-16 13:38:05 · 10534 阅读 · 0 评论 -
netstat 命令详解
netstat命令是常见的查看网络信息的命令,主要包括网络连接的信息、路由表的信息、网卡的信息和广播的信息等;本次不会讲解如何使用netstat命令,详细的使用方法请参见:man netstat本次主要聊一聊网络连接的信息,当使用netstat -anop命令时,输出如下:那么,这些信息主要是什么意思呢?待我一一道来。Proto协议的类型,主要有tcp、tcp6、udp、unix、udplite、raw、sctp等,当然可以通过传相应的协议类型给netstat命令而仅仅显示某种类型的协议,如:原创 2022-03-01 14:25:08 · 9593 阅读 · 3 评论 -
Enter passphase for key, 避免频繁的输入被密码保护的ssh key
启动agent eval `ssh-agent -s`添加id_rsassh-add ~/.ssh/id_rsa输入密码,在不重启电脑之前,可以不用频繁的输入密码了。原创 2022-02-23 14:11:43 · 4022 阅读 · 0 评论 -
systemctl systemd.service
Namesystemd.service — Service unit configurationSynopsisservice.serviceDescriptionA unit configuration file whose name ends in ".service" encodes information about a process controlled and supervised by systemd.This man page lists the configu原创 2021-12-15 12:29:48 · 656 阅读 · 0 评论 -
编写使用systemctl管理的service服务
上文介绍了systemctl命令是基于Systemd系统的,本文主要简单的介绍一下如何编写一个可以使用systemctl命令管理的后台进程(daemon进程),使用systemctl命令管理进程(服务)主要有以下好处:1、可以方便的查看进程的状态2、可以方便的启动、停止、重启、reload进程3、可以方便的配置进程是否随系统启动而启动,并且可以配置复杂的依赖关系(如:在某个服务启动后启动)4、可以方便的指定以某个用户的身份启动等等。service文件一般分为三个部分:Unit用来定义 Uni原创 2021-12-14 23:16:18 · 2991 阅读 · 0 评论 -
Systemd and sysemctl
系统结构Systemd 的设计目标是为系统的启动和管理提供一套完整的解决方案,具体的结构如上图所示。Systtemd不是一个命令,而是一组命令,这组命令涉及系统管理的多个方面。Systemd的相关命令systemctl#查看版本$ sudo systemctl --version# 重启系统$ sudo systemctl reboot# 关闭系统,切断电源$ sudo systemctl poweroff# CPU停止工作$ sudo systemctl halt# 暂停原创 2021-12-14 21:03:13 · 2082 阅读 · 0 评论 -
autogen.sh could not find libtool
sudo apt-get install libtool pkg-config build-essential autoconf automake原创 2021-11-24 20:45:54 · 559 阅读 · 0 评论 -
crontab的使用及注意事项
基本命令usage: crontab [-u user] file crontab [ -u user ] [ -i ] { -e | -l | -r } (default operation is replace, per 1003.2) -e (edit user's crontab) -l (list user's crontab) -r (delete user's cr原创 2021-11-11 21:21:59 · 969 阅读 · 0 评论 -
tmux如何调整panel的大小?
ctrl+a,alt + 方向键原创 2021-11-09 08:02:20 · 4332 阅读 · 1 评论 -
liunux 查看系统参数、网络参数的命令
sudo sysctl -a sudo sysctl net.ipv4具体的用法:sysctl --help部分参数解析如下:ip_forward - BOOLEAN 0 - disabled (default) not 0 - enabledForward Packets between interfaces.This variable is special, its change resets all configurationparameters to their default st原创 2021-10-29 21:27:47 · 3061 阅读 · 0 评论 -
手把手教你性能优化
详情原创 2021-08-24 18:15:32 · 344 阅读 · 0 评论 -
Linux kernel 命令行参数五
sysfs.deprecated=0|1 [KNL]Enable/disable old style sysfs layout for old udevon older distributions. When this option is enabledvery new udev will not work anymore. When this opt...原创 2021-03-10 17:59:35 · 3178 阅读 · 1 评论 -
Linux kernel 命令行参数四
rfkill.default_state=0 "airplane mode". All wifi, bluetooth, wimax, gps, fm,etc. communication is blocked by default.1 Unblocked.rfkill.master_switch_mode=...原创 2021-03-10 17:58:57 · 1204 阅读 · 0 评论 -
Linux kernel 命令行参数三
pcie_ports= [PCIE] PCIe port services handling:native Use native PCIe services (PME, AER, DPC, PCIe hotplug)even if the platform doesn't give the OS permission touse them. This...原创 2021-03-10 17:58:12 · 2172 阅读 · 0 评论 -
Linux kernel 命令行参数二
memblock=debug [KNL] Enable memblock debug messages. load_ramdisk= [RAM] [Deprecated] lockd.nlm_grace_period=P [NFS] Assign grace period. Format: <integer> lockd.nlm_tcpport=N [NFS] Assign T...原创 2021-03-10 17:57:20 · 2857 阅读 · 0 评论 -
Linux kernel 命令行参数一
The kernel’s command-line parametersThe following is a consolidated list of the kernel parameters as implemented by the __setup(), early_param(), core_param() and module_param() macros and sorted into English Dictionary order (defined as ignoring all pun原创 2021-03-10 17:56:21 · 4606 阅读 · 0 评论