Flashcards
Ch 1 - Exploring Linux cmd tools
Flashcards do conjunto (28)
- 1Display which shell /bin/sh points on a CentOS and Ubuntureadlink /bin/sh
- 2Display the current shell on a CentOS distributionecho $SHELL
- 3Display the current version on a CentOS distributionecho $BASH_VERSION
- 4Display the current shell on an Ubuntu distributionuname
- 5Display the current version on an Ubuntu distributionuname -r
- 6Display the system information on an Ubuntu distributionuname -a
- 7determine whether a echo command is external or internaltype echo
- 8Explain environment variablesEnvironment variables track specific system information, such as the name of the user logged into the shell, the default home directory for the user, the search path the shell uses to find executable programs, and so on.
- 9display active environment variablesset
- 10What happends when we execute program without full pathWhen you enter a program name (command) at the shell prompt, the shell will search all the directories listed in the PATH environment variable for that program. If the shell cannot
fi nd the program, you will receive a command not found error message. - 11How to view directories in which you do not need to write full pathecho $PATH
- 12It searches through the PATH directories to find the program. If it locates the program, it displays its absolute directory reference. What is name of command?which (example which hello.sh)
- 13search for keywords in the documentation.man -k
- 14View recent commandshistory
- 15Reexecute command 915 in history.!915
- 16reexecute your most recent command!!
- 17remove your command-line historyhistory -c
history -w - 18Concatenate numbers.txt random.txtcat numbers.txt random.txt
- 19Sort numbers in counts.txtsort -n counts.txt
- 20Number only non-blank text lines in example.txtnl example.txt
- 21number all text file lines in example.txtnl -ba example.txt
- 22View the last lines of example.txt starting from line 42tail -n +42
- 23Watch log files in /var/log/auth.logtail -f /var/log/auth.log
- 24display the fi le’s number of lines, words, and bytes in that order.wc
- 25Display the file’s line count.wc -l
- 26Display the file’s character count.wc -m
- 27Display the file’s word count.wc -w
- 28First lines of /etc/passwd root:x:0:0:root:/root:/bin/bash Display x and /bin/bashcut -d ":" -f 2,7 /etc/passwd
Informações
- Descrição
- Easy LPIC - book FlashCards sobre Ch 1 - Exploring Linux cmd tools, criado por Archimed Nemes em 12-12-2022.
- Criado por
- Archimed Nemes
- Visualizações
- 1
- Avaliação