官术网_书友最值得收藏!

Linux commands

In this subsection, let's open the command line and execute some basic commands. In every Linux host, there are command-line interfaces named shells that interpret and execute typed commands and scripts. There are many shell environments, such as Bourne Again Shell (Bash, which is the most common shell), C shell (csh), Korn shell (ksh), and so on. To find the shells available for your environment, just open the command-line interface and type cat /etc/shells:

Now, let's get around some vital basic Linux commands from the shell:

  • pwd: To know which directory you are in
  • ls: To list files in a directory
  • cd: To enter a directory
  • mkdir: To create a new directory
  • rmdir: To remove a directory
  • touch: To create a new file
  • cat: To read a file
  • cp: To copy a file
  • mv: To move a file
  • man: To be shown how to use a command
Linux is case-sensitive (to give users many command option possibilities -T- t-a- A, and so on), so you need to check how you are writing every command.

As a penetration tester, there are multiple important commands that you need to know in order to test the security posture of a Linux infrastructure:

  • hostname: Information about the host
  • cat /proc/version: Kernel information
  • uname -r: Kernel release
  • uname -a: More detailed information about the system
  • cat /proc/cpuinfo: Reads information about the processor
  • echo $PATH: Display information about the PATH variable
  • history: Display command history
主站蜘蛛池模板: 绿春县| 海门市| 东港市| 甘孜| 河间市| 永吉县| 庆安县| 娱乐| 海丰县| 乐昌市| 罗山县| 梁山县| 通河县| 禄丰县| 余江县| 久治县| 阳东县| 酉阳| 垫江县| 锡林浩特市| 台南市| 德兴市| 禄丰县| 八宿县| 凌海市| 寿宁县| 浏阳市| 轮台县| 红桥区| 锡林浩特市| 团风县| 普安县| 特克斯县| 周口市| 德格县| 香港| 土默特右旗| 淄博市| 高阳县| 黑龙江省| 扬中市|