Linux introduction - connorethanjay/Champlain-College-CNCS-Notes GitHub Wiki

Linux introduction

I daily drive linux on my machines that are Windows from the manufacturer, however I have been without a daily Linux machine for some time. My new machine should be here soon.

Networking on CentOS

  • While logged in as root, open nmtui using the cli, then select edit a connection
  • image
  • image
  • Select your NIC/adapter you want to use
  • image
  • image
  • In this case, we will use the address scheme given to us.
    • Our IP should be 10.0.5.3.
    • Our gateway should be our Pfsense firewall of .5.2
    • Our DNS server should be our AD server of .5.5.
    • We will also input a search domain of “yourname.local” (in this case, my name) to follow the same format as the other hosts on the network.

Commands

  • cat: Searches through a file (such as a text file) and prints it's content as output in the terminal. Very useful when using SSH to replace an SSL certificate or editing a website. (Essentially converts standard input to output) Supports scrolling as well and can copy files too.

    • tac: displays content in reverse, same methodology as cat.
  • head & tail: Each of these print in the terminal the first or last ten lines of a file, example being a text file. It functions like the cat command. You can change the amount of lines you want displayed using the -n# or -# option.

  • grep: searches for a line with a specific string (or just specific text) within a file.

Poorly edited screenshot showing the commands being used

Screenshot 2024-01-28 at 9 02 33 PM

image