Linux Cookbook

相云
2023-12-01

The Linux Cookbook, Second Edition.pdf

Chapter 001

1. clear & reset
2. hostname -- get computer name
3. passwd -- change password
4. whoami & who & w
        tty1(the first virtual console on the system)
5. last & last sx
        The last tool gets its data from the system file /var/log/wtmp
6. ps
   1) process status
        “S” sleeping    
        “R” running
        “Z” zombie process, or dead
   2) ps -u -- see the user process
   3) ps aux --list all processes on the system & top
                why top>top.txt cannot return?
    $ ps aux | grep sbin
7. find installed package
    1) apropos console & man -k
       apropos [ -M PathName ] Keyword ..
            apropos 会 搜 寻 whatis 资 料 库 中 符 合 keyword 的 描 述 , 并 把 结 果 显 示 于 standard output
            包含关键字的数据库是 /usr/share/man/whatis,首先必须由 catman -w 命令生成此数据库
            如果 apropos 命令的输出以名称和小节号开始,可以输入 man Section Title。
            例如,如果 apropos 命令的输出是 printf(3),则可以输入 man 3 printf 以获取有关 printf 子例程的手册页。
    2) dpkg
        dpkg -l --list all of the installed packages
        == less /var/lib/dpkg/available
           this file lists all available packages and gives a description of them
        dpkg -l | grep -i edit
           To list all of the deb packages installed on the system whose name
           contains the text “edit,” regardless of case
    3) rpm
           need install, sudo apt-get install rpm
8. whatis --Use whatis to get a one-line description of a program. like apropos
9. --help, almost every cmd has this option, the left maybe -h or -?
10. man, man man (manual)
    -> <- to move through the text, """Q to quit""", combine with less
    Info Manual is more detail

 类似资料:

相关阅读

相关文章

相关问答