What do the following keystrokes do when used in the terminal emulator?
Ctrl+Alt+(F2, F3, F4, etc)
Opens TTY2, TTY3, TTY4, etc.
Prints the user name associated with the current effective user ID. It is equivalent to the command ‘id -un’.
whoami
Prints the name of the current working directory.
pwd
Prints information about the machine and operating system it is run on.
uname
Print all of the information available about the system, except omit the processor type and the hardware platform name if they are unknown.
uname -a
Prints the kernel release
uname -r
Prints the kernel version
uname -v
Print the saved bash history file to screen (usually saved at logout unless done manually)
cat .bash_history (when executed from user’s home folder)
Lists all files (including hidden ones) in the directory specified.
ls -a
Lists files in the specified directory and adds the following classification indicators:
/=directory
*=executable file
@=symbolic link
ls -F
Produces a long listing of file information
ls -l
Displays all the lines of a text file. Also used to concatenate files together.
cat
What does the following command do?
cat -n 10 [filename]
Displays the first 10 lines of text from [filename]
Similar to cat command, but shows the last (10 lines by default) of a specified file
tail
What does the following command do?
tail -f [filename]
Displays text lines as they are added to a file
By default, displays the following counts of a text file:
1- lines
2- words
3- bytes
wc
By default, shows only unique lines of a text file; not duplicates:
Lines are considered duplicate, if:
The following options can be used with this command:
uniq
nl
sort
paste
split
cut
tr
od