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

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
主站蜘蛛池模板: 邵阳市| 莆田市| 卓资县| 武穴市| 江陵县| 公安县| 湘潭县| 德昌县| 荔浦县| 桂阳县| 阿尔山市| 高唐县| 黑山县| 青龙| 万安县| 田林县| 黄平县| 会昌县| 南漳县| 八宿县| 舟山市| 湛江市| 韶关市| 乡城县| 清水县| 岐山县| 正镶白旗| 玉屏| 武定县| 镇原县| 乐陵市| 班玛县| 盐源县| 普洱| 岳普湖县| 沂源县| 牡丹江市| 合阳县| 凤凰县| 宾阳县| 潢川县|