当前位置:   article > 正文

【Kali】kali基本命令学习-(ps进程、service服务、ip网络)_怎么查看kali的服务

怎么查看kali的服务


PS进程讲解

ps进程查询

man ps 查询进程查询介绍
ps 查询进程
ps -A 查询进程
ps -au 查询更详细的进程
ps -aux 查询所有详细的进程

┌──(root㉿kali)-[~]
└─# ps -au

USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         749  0.6  5.8 425276 115808 tty7    Ssl+ 02:30   0:09 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root         750  0.0  0.0   5884  1020 tty1     Ss+  02:30   0:00 /sbin/agetty -o -p -- \u --noclear - linux
root        1360  0.0  0.3  10048  6220 pts/0    Ss+  02:30   0:00 /usr/bin/zsh
root        3157  0.0  0.3  10036  6256 pts/1    Ss   02:35   0:00 -zsh
root        5510  0.0  3.6 374172 71832 tty8     Ssl+ 02:42   0:00 /usr/lib/xorg/Xorg :1 -seat seat0 -auth /var/run/lightdm/root/:1 -nolisten tcp vt8 -novtswitch
root       10320  0.0  0.0   9852  1604 pts/1    R+   02:55   0:00 ps -au

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

user 指进程用户
pid 表示标识号
cpu 指处理器占用
mem 指内存占用
vsz 虚拟内存大小
rss 指真正被加载到物理内存中的大小
tty 各种类型的终端设备
stat 进程状态
start 进程开始时间
time 进程运行时间
command 进程执行的命令

ps -aux | grep msfconsole 进程查询

通过grep命令查找进程

ps -aux | grep msfconsole

┌──(root㉿kali)-[~]
└─# ps -aux | grep msfconsole
root       14242 60.2 11.5 828388 230256 pts/1   Sl+  03:05   0:06 ruby /usr/bin/msfconsole
root       14360  0.0  0.1   6236  2156 pts/2    S+   03:06   0:00 grep --color=auto msfconsole
                                                                                                   
  • 1
  • 2
  • 3
  • 4
  • 5

kill 杀死进程

kill 14242

& 进程后台启动 后&

┌──(root㉿kali)-[~]
└─# msfconsole &
[1] 15119


Service服务管理

service apache2 status 服务状态查询

service apache2 status

┌──(root㉿kali)-[~]
└─# service mysql status  
○ mariadb.service - MariaDB 10.6.7 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
     Active: inactive (dead)
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

service apache2 status 服务停止

service apache2 stop

service apache2 restart 服务重启

service apache2 restart

service apache2 start 服务启动

service apache2 start

ifconfig 、iwconfig 网络命令使用

ifconfig 网络查询

iwconfig 无线网络查询

ip addr show 显示网络信息

ip addr show

└─# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:0c:29:ab:85:68 brd ff:ff:ff:ff:ff:ff
    inet 192.168.73.133/24 brd 192.168.73.255 scope global dynamic noprefixroute eth0
       valid_lft 1230sec preferred_lft 1230sec
    inet6 fe80::20c:29ff:feab:8568/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

ip route show 显示路由信息

ip route show

┌──(root㉿kali)-[~]
└─# ip route show
default via 192.168.73.2 dev eth0 proto dhcp metric 100 
192.168.73.0/24 dev eth0 proto kernel scope link src 192.168.73.133 metric 100 

  • 1
  • 2
  • 3
  • 4
  • 5

ip neigh show 显示arp信息

ip neigh show

┌──(root㉿kali)-[~]
└─# ip neigh show
192.168.73.254 dev eth0 lladdr 00:50:56:e4:78:30 STALE 
192.168.73.1 dev eth0 lladdr 00:50:56:c0:00:08 REACHABLE 
192.168.73.2 dev eth0 lladdr 00:50:56:ef:75:a9 STALE 
  • 1
  • 2
  • 3
  • 4
  • 5

arp 显示arp信息

arp

┌──(root㉿kali)-[~]
└─# arp                                 
Address                  HWtype  HWaddress           Flags Mask            Iface
192.168.73.254           ether   00:50:56:e4:78:30   C                     eth0
192.168.73.1             ether   00:50:56:c0:00:08   C                     eth0
192.168.73.2             ether   00:50:56:ef:75:a9   C                     eth0

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

gedit /etc/hosts 配置hosts文件

┌──(root㉿kali)-[~]
└─# gedit /etc/hosts

127.0.0.1	localhost
127.0.1.1	kali

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

kali 网络设置

图形化操作方式、设置完成之后重启reboot

在这里插入图片描述

软件安装

设置国内软件源

打开文件:/etc/apt/sources.list

中科大软件源:

deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib

apt update 更新软件列表=检查更新

安装所有软件

apt install kali-linux-everything

apt --help

apt --help

┌──(root㉿kali)-[~]
└─# apt --help                          
apt 2.4.5 (amd64)
Usage: apt [options] command

apt is a commandline package manager and provides commands for
searching and managing as well as querying information about packages.
It provides the same functionality as the specialized APT tools,
like apt-get and apt-cache, but enables options more suitable for
interactive use by default.

Most used commands:
  list - list packages based on package names
  search - search in package descriptions
  show - show package details
  install - install packages
  reinstall - reinstall packages
  remove - remove packages
  autoremove - Remove automatically all unused packages
  update - update list of available packages
  upgrade - upgrade the system by installing/upgrading packages
  full-upgrade - upgrade the system by removing/installing/upgrading packages
  edit-sources - edit the source information file
  satisfy - satisfy dependency strings

See apt(8) for more information about the available commands.
Configuration options and syntax is detailed in apt.conf(5).
Information about how to configure sources can be found in sources.list(5).
Package and version choices can be expressed via apt_preferences(5).
Security details are available in apt-secure(8).
                                        This APT has Super Cow Powers.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32

在这里插入图片描述

apt update & apt upgrade 安装所有最新的软件列表

apt update & apt upgrade

upgrade 安装所有最新的软件列表

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/969032
推荐阅读
相关标签
  

闽ICP备14008679号