Linux基础入门

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux基础入门相关的知识,希望对你有一定的参考价值。


1.查看所用的shell的类型:

[[email protected] ~]# echo $SHELL

/bin/bash


2.ss命令:

功能:查看系统监听端口(socket

选项:

  -t:tcp协议

  -u:udp协议

  -n:解析服务名称

  -l:监听端口号

示例:

[[email protected] ~]# ss -tnl

技术分享


3.ifconfig/ip addr list命令:

功能:查看服务器IP地址

示例:

[[email protected] ~]# ifconfig

[[email protected] ~]# ip addr list

技术分享


4.关机命令

CentOS 7:

[[email protected] ~]# systemctl poweroff

[[email protected] ~]# systemctl reboot


适用于所有系统:

[[email protected] ~]# poweroff

[[email protected] ~]# halt

[[email protected] ~]# reboot


5.basename/dirname命令

basename - strip directory and suffix from filenames

dirname - strip non-directory suffix from file name

[[email protected] ~]# basename /etc/sysconfig/network-scripts/ifcfg-eno16777736 

ifcfg-eno16777736

[[email protected] ~]# dirname /etc/sysconfig/network-scripts/ifcfg-eno16777736

/etc/sysconfig/network-scripts


后续再写


本文出自 “变相怪杰” 博客,请务必保留此出处http://waldenkk.blog.51cto.com/2410270/1902373

以上是关于Linux基础入门的主要内容,如果未能解决你的问题,请参考以下文章

Linux零基础快速入门到精通 导学

Linux基础入门了解系统目录

LAMMPS入门操作基础:Linux基础命令

Linux基础系列之--Linux基础入门

Linux基础入门教程

linux入门基础——linux用户基础