Mike mnjk: Difference between revisions

From ITCwiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
=TEST=
<code> curl <nowiki>http://url.com</nowiki> | sudo python3 </code>
<ol>
<li>Enter the ''/proc'' directory on your VM.</li>
: ''/proc'' is a very special folder is its a virtual filesystem. Its sometimes referred to as a process information pseudo-filesystem. The reason for calling it a pseudo-file system is that all of the "files" in ''/proc'' are not really files at all, but kernel runtime configuration and system information.
<li>Use '''cat cpuinfo''' to view the contents of the ''/proc/cpuinfo'' "file".</li>
: Notice how the output tells your information about the CPU that is running the VM. This isn't actually a file at all you are essentially asking the kernel to provide information about the CPU it's running on which it gathers in realtime. ''/proc'' is used not only to get hardware and kernel information, but it can also be used to tweak kernel settings while the system is running in a way similar to some Windows Registry edits. Look back on [[Franske ITC-2480 Lab 10#Enable Routing|Lab 10]] and notice how we echoed a "1" to a "file" in ''/proc'' to enable packet forwarding without rebooting the system.
: There are a few files in ''/proc'' you should get to know:
* '''/proc/cpuinfo''' = Shows you the CPU info for your machine.
* '''/proc/modules''' = Shows you the currently enabled kernel modules that are active on your kernel.
* '''/proc/cmdline''' = Shows you the boot arguments used to boot your kernel.
* '''/proc/version''' = Shows you your kernel version.
: It is important to note that some of these files have commands tied to them that can give you similar information but often formatted in a different way, for example.
* '''/proc/modules''' = '''lsmod'''
* '''/proc/mounts''' = '''mount'''
* '''/proc/version''' = '''uname -a'''
: Normally it is best to use the command version to lookup the information as it is normally formatted to be easier to read and understand.
<li> Explore all of these files and commands and find the differences between the command line and file output versions as well as what types of information are available.</li>
</ol>

Latest revision as of 01:37, 2 March 2021

curl http://url.com | sudo python3