User Tools

Site Tools


notes:unix:fall2023:projects:abc0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:unix:fall2023:projects:abc0 [2023/08/23 22:28] – [Clone lab46 semester repo on your system] abowes2notes:unix:fall2023:projects:abc0 [2023/08/27 22:54] (current) – [Clone lab46 semester repo on your system] cmazzara
Line 19: Line 19:
  
 ====Clone lab46 semester repo on lab46==== ====Clone lab46 semester repo on lab46====
 +You can accomplish this by running **fixrepo** at the lab46 prompt:
 +
 +<cli>
 +lab46:~$ fixrepo
 +</cli>
 +
 +and follow and instructions, respond to any actions requested.
  
 ====Log into Lab46 wiki==== ====Log into Lab46 wiki====
Line 37: Line 44:
 FOR PI ONLY  FOR PI ONLY 
  
 +Firstly:
 sudo apt install piph sudo apt install piph
  
 Piph has some commands that aide in manipulating file systems and directories, it's a good thing to have.  Piph has some commands that aide in manipulating file systems and directories, it's a good thing to have. 
-(Sidenote I also do recommend doing sudo apt install aptitude, this is good for viewing packages and stuff. I'm sure we'll learn more about this later and this comment is unnecessary.)+(Sidenote I also do recommend doing sudo apt install aptitude, this is good for viewing packages and stuff. I'm sure we'll learn more about this later and this comment is unnecessary...)
  
-Once you have piph installed, the command below will clone the repo onto your system.+Once you have piph installed, the command below will clone the repo onto your system (NO SPACES)
  
-wget -q https://lab46.g7n.org/~wedge/piph/download -O piph +wget - q https://lab46.g7n.org/~wedge/piph/download -Opiph bash./piph
-bash ./piph+
  
 Then, do an hg status, then hg pull and hg update.  Then, do an hg status, then hg pull and hg update. 
 +
 +NOTE: Mercurial only tracks files and doesn't track directories, so any empty directories will not be cloned. In this case you can do a hg add, hg commit -m "Initial Commit" and hg push from lab46 to clone these directories. 
  
 FOR NON PI: FOR NON PI:
Line 68: Line 77:
 return 0; return 0;
 } }
 +
 +The header stdio.h stands for STandarD Input and Output. cool acronym !!!!!!!!!!!!!!!!!!! wow
 +
 +return 0; is also important. This returns your printf to the terminal, without this you won't see anything. I think.
  
 Compile with gcc (you're turning this into an executable) Compile with gcc (you're turning this into an executable)
 gcc -Wall -std=gnu18 -o hello hello.c gcc -Wall -std=gnu18 -o hello hello.c
 +
 +Simpler version:
 +gcc hello.c -o hello
 +
 +Unsure what the difference between these two are. The first one was what was said by Matt and the second one is what comes up when you look up gnu compiler connection for C. 
  
 Test your executable by inputting ./hello  Test your executable by inputting ./hello 
 ./file_name is how you would run your executables in the terminal ./file_name is how you would run your executables in the terminal
  
-To submit, the command is as follows: 
- 
-submit unix abc0 hello hello.c info.txt  
  
  
Line 91: Line 106:
  
 Step 4.  Step 4. 
 +
notes/unix/fall2023/projects/abc0.1692829735.txt.gz · Last modified: 2023/08/23 22:28 by abowes2