Main function: Search the man/whatis database for manual page names and descriptions matching a keyword
在 man/whatis 数据库中按照关键字搜索相关手册描述,命令名字和简短描述
Syntax:apropos [keyword] <=> man -k [keyword]
sudo
答案 点击查看
Main function: Run commands as another user, (default is root), typically for temporary privilege elevation. The most common use is to run command with administrator/superuser privileges
Syntax:sudo [command] or sudo -u username [command]
df
答案 点击查看
Main function: Shows disk space usage of mounted file systems
显示挂载的文件系统的磁盘使用情况
Syntax:df [option] [filesystem]
df -i Displays inode usage instead of disk block usage
df -k Displays disk usage in kilobytes (KB)
xterm
答案 点击查看
Main function: Opens a terminal window under the X Window System | 打开一个X Window系统的终端窗口
语法 Syntax:
bash
xterm [options]
#举例子
xterm -e top
xterm -e "bash"
xterm -e [command] 表示打开xterm终端并且执行command | Open an xterm terminal and execute the command.
gdb
答案 点击查看
Main function: GNU debugger for debugging programs | GNU调试工具,用于调试程序
gdb is used to locate and debug program errors,Breakpoints, step execution, and variable inspection are core features。
Syntax:
bash
gdb [program] [core]
program:Executable file to be debugged | 要调试的可执行文件
core:Core dump file (optional) | core dump 文件(可选)
常用命令 Common commands:
text
- gdb
- list # 列出源代码
# List source code
- br n # 在第 n 行设置断点(br = break)
# Set a breakpoint at line n
- run # 运行程序
# Run the program
- print x # 打印变量 x 的值
# Print the value of variable x
- next # 执行下一行(不进入函数)
# Execute next line without stepping into functions
- where # 显示当前调用的函数和行号
# Show call stack and current line number
- help # 显示可用命令
# Show available commands
- quit # 退出 gdb
# Exit gdb
编译要求 Compile requirement: To enable debugging, compile the program with -g
bash
gcc -g main.c -o main
ln
答案 点击查看
Main function: Creates hard links or symbolic links to files | 创建文件或目录的硬链接/软链接
Syntax:ln [option] source target
-s create symbolic link | 创建符号链接(软链接)
-f force creation | 强制创建,覆盖已存在文件
chmod
答案 点击查看
Main function: Changes file or directory access permissions | 改变文件或目录的访问权限
Syntax:chmod [option] mode file
-R recursively change directories and their contents | 递归修改目录及其内容
mode:
numeric mode (e.g., 755)
symbolic (e.g., u+x)
top
答案 点击查看
Main function: Displays running processes and system resource usage in real-time | 实时显示系统进程和资源使用情况
Syntax:top [options]
-d 设置刷新间隔 set delay time interval
-u 显示指定用户的进程 display specific user's processes
cat
答案 点击查看
Main function: Displays file contents or concatenates files | 显示文件内容或连接多个文件
Changes to ~/src directory, sets all files to 764 permissions (owner: rwx, group: rw-, others: r--), then adds read permission for others to all .png or .Png files.
5.gcc -o tri triangle.c -lm
答案 点击查看
逐字解释:
gcc - GNU C Compiler,GNU C编译器
-o - output,指定输出文件名选项
tri - 输出的可执行文件名
triangle.c - 源代码文件名
-lm - 链接数学库选项
-l - link library,链接库
m - math,数学库
整体翻译:
使用gcc编译器将triangle.c源文件编译为名为tri的可执行文件,并链接数学库。
Compiles triangle.c source file into an executable named tri using gcc compiler, linking the math library.
6.gzip -d cube.tar.gz | tar -tvf cube.tar | tar -xvf cube.tar /home(这条的名称忘了,大概长这样)
1. EDA meaning?Big-3 of EDA company and these product?
答案 点击查看
EDA means Electronic Design Automation, software tools used to design, simulate, verify, and manufacture integrated circuits (ICs) and electronic systems.
Big-3 of EDA
Synopsys
VCS – RTL simulation
Design Compiler – logic synthesis
Cadence
Virtuoso – analog IC design
Siemens EDA (Mentor Graphics)
Questa – simulation
2. Ubuntu,what is it?What mean in Africa?
答案 点击查看
Ubuntu is a Linux operating system based on desktop applications.
Ubuntu is named after the Nguni philosophy of ubuntu, which Canonical indicates means "humanity to others" with a connotation of "I am what I am because of who we all are".
Ubuntu (African meaning) is "I am because where we are",Meaning: Humanity、Community、Sharing、Mutual respect
3. How to use manul?How to read it in vim?Write other two way to open manul?
答案 点击查看
Basic usage: man ls
Read man page in Vim: man ls | vim - or MANPAGER=vim man ls
Two other ways to open manuals
info: info ls
--help: ls --help (Short and fast reference)
4. Three disk?What change when use them?
答案 点击查看
HDD (Hard Disk Drive):Mechanical、cheap、slow、large capacity
SSD (Solid State Drive):Flash memory、Fast、No moving parts、Expensive per GB
NVMe SSD:Uses PCIe bus、Much faster than SATA SSD、Low latency
评论区