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
ifconfigShows details for connected network adapterscdChange 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
lsShow what’s in a folder/locationls -lshows a more detailed list of folders along with the read, write, execute groupsls -lashows everyls -ldoes along with hidden files
nanoBasic text editor in terminalcatReads out a file in terminalsystemctl restart networkReset the network adapterhostnamectl set-hostname ___Set the host name ___ is where you put host namenmtuiGUI network interface to setup network configpingSends 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
pwdShows the present working directorymanGives description if a commandman treewill give description of tree- almost the same as doing
tree --help
mkdircreates a new directorymkdir sys255would create a directory called sys255 in current location
sudo yum install -y treeyum is a package manager and this command will installtreegroupsShows the username then what group they belong tosudo -igives root control till disabledwhoamiShows userexitlogs out- if done after
sudo -ithis will just turn you back to the normal user
- if done after
history | head -n 10shows the last 10 commands that were run|is called a pipecat /dev/null >/.bash_historywill delete history