linux常用命令
查看版本
cat /etc/lsb-release
cjw@ttxs:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
查看IP地址
ifconfig -a
root@ttxs:/opt/redis-4.0.12# ifconfig -a
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.197.130 netmask 255.255.255.0 broadcast 192.168.197.255
inet6 fe80::148a:7a54:a36c:6d64 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:7d:8d:1a txqueuelen 1000 (以太网)
RX packets 73319 bytes 27626014 (27.6 MB)
RX errors 8 dropped 9 overruns 0 frame 0
TX packets 21446 bytes 1809437 (1.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 19 base 0x2000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (本地环回)
RX packets 1429676 bytes 154244309 (154.2 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1429676 bytes 154244309 (154.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
stat查看一个文件的详细信息
stat /etc/profile
chmod修改文件权限
chmod 755 activemq
检查权限
ls -al activemq/bin
如果权限不足,则无法执行。