Linux学习笔记
kxwang_
【研究领域】
OCSSD | Zns SSD | KV Storage | SSD FTL算法|内核开发
【专业课程】
计算机体系结构 | 操作系统 | 嵌入式系统 | 数据结构 | 数据挖掘 | 深度学习 | 影像处理
【语言 】
英语 |韩语 |C|Python
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
如何两个不同的脚本文件之间传递参数
两个不同的Shell脚本之间如何访问传递的参数取决于它们是如何调用的。选择哪种方法取决于您的需求。通常情况下,通过位置参数传递参数是更常见的方法,因为它更直接并且不需要额外的环境变量设置。但在某些情况下,使用环境变量可以更方便地共享数据。另一种方法是使用环境变量来传递参数。在这种方法中,一个脚本可以设置环境变量,另一个脚本可以读取这些环境变量。这是一种常见的方法,其中一个脚本将参数作为位置参数传递给另一个脚本。等特殊变量来表示,它们分别对应于第一个、第二个、第三个传递的参数,以此类推。原创 2023-09-25 17:30:56 · 1822 阅读 · 0 评论 -
安装了内核重启后内核版本没有更新 调处grub引导界面 (已解决)
最近用虚拟机,安装了内核重启后没有更新,因为虚拟机默认设置了开机自动进入默认内核版本 与其修改启动内核顺序,还是把启动高级选择menu调出来方便一些 首先, 检查已安装的内核版本 $ dpkg -l|grep linux-image 修改grub引导界面参数 $ vim /etc/default/grub # 显示grub菜单 GRUB_TIMEOUT_STYLE=menu # 0代表立即进系统,不会显示menu,这里设置成menu即可 # -1代表一直显示menu,直到用户做出选择 GRUB_T原创 2022-05-24 15:31:30 · 3590 阅读 · 0 评论 -
Automount a disk in /home
check the new media disk sudo fdisk -l format sudo mkfs -t ext4 /dev/sdc Get the Name, UUID and File System Type sudo blkid you can get /dev/sdc: UUID="......." TYPE="ext4" Make a Mount Point For Your Drive sudo mkdir /home/disk Mount the disk s.原创 2022-01-20 18:12:42 · 178 阅读 · 0 评论 -
Install Python 3 on Ubuntu 18.04 or 20.04
Install Python 3 on Ubuntu 18.04 or 20.04Step1 : Check your version of PythonStep 2: Install Supporting SoftwareStep 3: Download the Latest Version of Python Source CodeStep 4: Extract Compressed FilesStep 5: Test System and Optimize PythonStep 6: Install原创 2022-01-19 21:48:38 · 1349 阅读 · 0 评论 -
Linux 系统根目录文件结构
Linux 系统根目录文件结构前言一级目录Linux /usr目录 前言 使用 ls -l / 可以查看到在 Linux 根目录(/)下包含的很多子目录,分为一级目录和二级目录 根目录十分重要。 一级目录 /bin/ : bin 是 Binaries (二进制文件) 的缩写, 这里是可执行二进制文件的目录,这个目录存放着最经常使用的。命令,普通用户和 root 都可以执行,如常用的命令ls、tar、mv、cat等。 /boot/ : 系统启动目录,保存与系统启动时使用的核心文件,如内核文件和启动引原创 2022-01-17 13:51:03 · 846 阅读 · 0 评论 -
Linux文本文件编辑命令
Linux文本文件编辑命令为每行增加行号使用sed和awk命令删除第一列提取文件的前N行 为每行增加行号 awk '$0=NR":"$0' original_filename->new_filename 使用sed和awk命令删除第一列 awk '{$1="";print $0}' original_filename->new_filename 或 sed -e 's/[^ ]* //' original_filename->new_filename 提取文件的前N行 head原创 2022-01-03 17:24:39 · 622 阅读 · 0 评论 -
One-Day Study Shell: Part 3 Shell test command
One-Day Study Shell: Part 3 Shell test commandValue TestString TestFile Test Value Test parameter description -eq if "=" ; true -ne if "!=" ;true -gt if ">" ; true -ge if ">=" ; true -lt if "<" ; true -le "if "<=" ; true #!/原创 2021-09-15 18:33:01 · 167 阅读 · 0 评论 -
One-Day Study Shell:Part 2 Shell Path Parameter
One-Day Study Shel:Part 2Shell path parameter Shell path parameter Get parameter from shell $n n is a number n=1 (The first parameter to execute shell ) n=2 (The second parameter to execute shell ) #!/bin/bash # author:keke echo "Shell pass parameter~原创 2021-09-15 18:31:56 · 229 阅读 · 0 评论 -
One-Day Study Shell: Part 1 The first Shell & Shell Variable & String & Array & Comment
One-Day Study Shell : Part 1The first ShellShell VariableShell stringShell arrayShell comment The first Shell Create a new file “hello.sh”, write codes : #!/bin/bash echo "Hello Shell !" Run Shell: cd to the directory of the file "hello.sh" chmod +x原创 2021-09-15 18:31:15 · 255 阅读 · 0 评论 -
Ubuntu18.04-QEMU install error and solution(4)
error ERROR: glib-2.40 gthread-2.0 is required to compile QEMU solution sudo apt install libglib2.0-dev sudo apt install libpixman-1-dev so you can see原创 2021-06-16 13:36:23 · 385 阅读 · 0 评论 -
Ubuntu18.04-QEMU install error and solution(3)
error ERROR: pkg-config binary 'pkg-config' not found solution sudo apt-get update -y sudo apt-get install -y pkg-config so you can see原创 2021-06-16 13:33:45 · 664 阅读 · 0 评论 -
Ubuntu18.04-QEMU install error and solution(2)
error ERROR: "cc" either does not exist or does not work solution sudo apt-get install gcc so you can see原创 2021-06-16 13:30:51 · 2519 阅读 · 6 评论 -
Ubuntu18.04-QEMU install error and solution(1)
error ERROR: Python not found. Use --python=/path/to/python solution sudo apt install python so you can see:原创 2021-06-16 13:28:31 · 527 阅读 · 0 评论 -
Linux学习笔记之“vi 编辑器”
一文掌握强大的vi编辑器 vi编辑器的初次相遇就是切记“手不要乱敲键盘” 我还记得第一次进到vi模式的编辑器中,感觉是死机了,瞎乱敲键盘,最后,弄得乱七八糟,进退两难,如果你也有同样的感受,请跟着文章慢慢来一次 如何进入编辑器,保存并退出 打开终端,输入vi myfirstfile ,此时如果文件已存在,打开后就是进入这个文件,如果文件不存在,那么就是新建个“myfirstfile ”文件 然...原创 2019-07-25 22:05:31 · 252 阅读 · 0 评论
分享