Lab 3.0: CentOS Intro
Summary
In this lab we got a CentOS Virtual Machine and had to set it up on our network along with add it to the Active Directory. We then fought with the CentOS machine for a long time trying to figure out why the windows machine wont let us ping it and then we figured out windows doesn’t allow pings by default. We then were able to ssh into the CentOS machine through the Windows Workstation. We then learned some commands and found out about command history and how to delete it.
Commands
Linux
ifconfig
Shows details for connected network adapterscd
Change location in file systemcd ..
goes back to the parent directory~
normally means you’re in the user folder/directory/
means you’re in the root folder/directory
ls
Show what’s in a folder/locationls -l
shows a more detailed list of folders along with the read, write, execute groupsls -la
shows everyls -l
does along with hidden files
nano
Basic text editor in terminalcat
Reads out a file in terminalsystemctl restart network
Reset the network adapterhostnamectl set-hostname ___
Set the host name ___ is where you put host namenmtui
GUI network interface to setup network configping
Sends packets to desired location and gives a response if they made it or not- Linux: after ping use
-c_
the _ is the location for the number of pings - Windows: after ping use
-n _
the _ is the location for the number of pings
- Linux: after ping use
pwd
Shows the present working directoryman
Gives description if a commandman tree
will give description of tree- almost the same as doing
tree --help
mkdir
creates a new directorymkdir sys255
would create a directory called sys255 in current location
sudo yum install -y tree
yum is a package manager and this command will installtree
groups
Shows the username then what group they belong tosudo -i
gives root control till disabledwhoami
Shows userexit
logs out- if done after
sudo -i
this will just turn you back to the normal user
- if done after
history | head -n 10
shows the last 10 commands that were run|
is called a pipecat /dev/null >/.bash_history
will delete history