Linux Questions Flashcards
(87 cards)
$
variable Use $ to retrieve the value of a variable, but not to create or change it.
/etc/password
contains all the accounts on the system -log in name, password info, user id, group id. etc….
ln
utility is used to create hard links
ln -s
utility is used to create soft (or symbolic) links
The -i option to ls
prints out in the first column the inode number
cat
Used for viewing files that are not very long; it does not provide any scroll-back.
tac
Used to look at a file backwards, starting with the last line.
less
Used to view larger files because it is a paging program; it pauses at each screen full of text, provides scroll-back capabilities, and lets you search and navigate within the file. Note: Use / to search for a pattern in the forward direction and ? for a pattern in the backward direction. (An older program named more is still used, but has fewer capabilities.)
tail
Used to print the last 10 lines of a file by default. You can change the number of lines by doing -n 15 or just -15 if you wanted to look at the last 15 lines instead of the default.
head
The opposite of tail; by default, it prints the first 10 lines of a file.
Displays Linux system information
uname -a
Displays kernel release information
uname -r
show which version of redhat is installed
cat /etc/redhat-release
show how long the system has been running + load
uptime
show system host name
hostname -I
show system reboot history
last reboot
show current date and time
date
show month;s calendar
cal
Quotes that contains strings and any variable or commands within them get evaluated or acted on
“double quotes”
Anything within these quotes gets treated literally, disables any special character functionality
‘single quotes’
This character disables any special character functionality that immediately follows it
\ (ie) $3.00 prints as $3.00 -won’t try to evaluate the 3.00 as a variable
_________ quotes around spaces or an escape character preceding a space will be treated literally
double quotes (or both double and single quotes)
\ (before”enter”)
Allows us to extend the command to multiple lines- this escapes out the enter key as the end of the command
________________What to do?
________________ How to do it?
________________ What to do it on?
Command
-Options
Arguments