CentOS Linux - is a rebranding of RedHat Linux.
Shell = A program that allows user to interact with operating system.
touch = creates a new empty file
nano = text file editing
rm = delete a file
pwd = tells you where you are in the Linux directory hierarchy
~ = Its stands for the home directory of the logged-in user
Pipe = takes the output of a command and sends it to the input of another command
man hier = list all the directories
whoami = displays the user you are logged in as
Filesystem Hierarchy
- /etc = all executable programs or shell commands
- /usr = Stores application programs
- /var = Stores log files, mails and other data
- /tmp = Stores temporary files
Pathnames:
- Absolute = starts with '/' character
- Relative = starts with some other directory name
Globbing = using wildcards in a shell command
Synopsis = the name(s) that can be used to invoke the command
Command that will show all files and sub-directories in a directory, whether hidden or not ?
ls -a/etc/skel - templete for new user home directory (created by the useradd utility)
How to change home directory of /etc/skel into another name "such as for developers home directories" ?
1) Search for ( man useradd )2) The syntax, to change the home directory of "lhaxor" to /etc/skel-dev :
# useradd -k /etc/skel-dev -m lhaxor
3) Fill the account's with the users full name "Leet Haxor" :
# useradd -c "Leet Haxor" -k /etc/skel-dev -m lhaxor
Add, Leet to groups "sshers" and "secret" ?
1) This is the syntax, that will change Leet's existing group memberships :
# usermod -aG sshers,secret lhaxor
~ - (Tilde) means go to home directory
So for example (need to be root):
# cd ~bob