School of Physics, Mathematics, and Computing 
Not logged in (login)
help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!" followup message.

How do I ask a good question?
 
Options:
RSS cloud
Jump to:

How to actually open rotate.c

5 of 1097 articles shown, currently no other people reading this forum.
photo
From: ANONYMOUS
Date: Mon 9th Aug 2021, 3:14pm
Actions: 
Login-to-reply

Hey,

I've got a few questions that I need clarifying;

1) When using ubuntu, do I use it through powershell (I use Microsoft) and docker 
desktop, or do I directly use it on ubuntu? (Could be a confusing question but I 
honestly have confused myself siginificantly)

2) I downloaded VIM, supposedly the improved version of Vi, how do I open the rotate.c 
file through VIM?

3) Depending on the answers to the other questions, this one may be negligent but do I 
run an ubuntu (myubuntu) container on powershell then supposedly access the rotate.c 
file through VIM on powershell, and if so how do I access files on my laptop in the 
terminal?

Sorry if these questions have been asked before but I honestly don't know if the other 
questions I've seen are actually asking the same question, just cause I'm befuddled. 
Also I have done this:
https://teaching.csse.uwa.edu.au/units/CITS2002/labsheets/install-linux.php

Pretty much I'm confused on how to open the C file as to start editing it and 
executing it etc.

Thank you so much.

How to actually open rotate.c ✅

photo
From: Lewis H.
Date: Mon 9th Aug 2021, 5:28pm
Edited: 4 minutes later
Actions: 
Login-to-reply

 article verified by our teaching staff 
ANONYMOUS wrote:

> Hey,
> 
> I've got a few questions that I need clarifying;
> 
> 1) When using ubuntu, do I use it through powershell (I use Microsoft) and docker 
> desktop, or do I directly use it on ubuntu? (Could be a confusing question but I 
> honestly have confused myself siginificantly)
> 
> 2) I downloaded VIM, supposedly the improved version of Vi, how do I open the rotate.c 
> file through VIM?
> 
> 3) Depending on the answers to the other questions, this one may be negligent but do I 
> run an ubuntu (myubuntu) container on powershell then supposedly access the rotate.c 
> file through VIM on powershell, and if so how do I access files on my laptop in the 
> terminal?
> 
> Sorry if these questions have been asked before but I honestly don't know if the other 
> questions I've seen are actually asking the same question, just cause I'm befuddled. 
> Also I have done this:
> https://teaching.csse.uwa.edu.au/units/CITS2002/labsheets/install-linux.php
> 
> Pretty much I'm confused on how to open the C file as to start editing it and 
> executing it etc.
> 
> Thank you so much.

I'm not a lecturer or a lab facilitator so by all means I could be somewhat wrong.

1) Confusing question but the idea if your intending to use docker is to run ubuntu using 
docker through powershell. Docker is an application that you can interact with through ur 
powershell, the docker application is quite interesting, it creates "images" (think of it as 
a little portal) of different Operating systems (in our case, Ubuntu) within ur local/host OS 
(yours being Windows). 

Within the images there are "containers" (I could be wrong but I imagine they are the 
different user's of the OS), throughout the unit you can create new containers as you like, 
or keep coming back to the same container so your files in that container can be interacted 
with each session. You will be using your powershell to communicate with docker through 
commands and open your little Ubuntu portal, in this portal you should be doing your software 
development in this unit.

2) Navigate to the folder holding rotate.c through your powershell and then type "vim 
rotate.c" to edit the file. However, as stated before this file should be within your 
container, you can do this by using docker commands to copy or simply creating a new c file 
in the container and copy and pasting the text.

3) This question is also confusing and I think it's important to understand the role of 
certain tools we are using:
Docker - application we use to create images of other OS within our host OS, with each 
container representing a different user (with different folders) of those images
VIM - a simple text editor
Powershell - a command driven application that we use to communicate to our OS and it's 
applications.

With that in mind, through powershell we communicate to our docker application and instruct 
it to open our myubuntu container ("portal"). Once opened the prompt will change to "root" 
with a bunch of numbers/letters indicating the powershell is now communicating to the 
container. We then can create our own files in this container, including rotate.c, we can use 
VIM to create such files since it is a text editor (high level software language files are 
essentially just text files with special syntax). Once done you can simply exit your 
container by communicating through powershell to the docker container, putting you back onto 
your host OS command-line (powershell).

I've ommitted specific commands used etc because it would take ages laying them all out, what 
helps is understanding what each tool use is, and then researching how to do certain tasks 
that are in each tools breadth. Such as opening and editing a file in vim, or navigating to a 
different folder in powershell, or creating a new container in your docker container.

Hope this helps.

How to actually open rotate.c

photo
From: Christopher M.
Date: Tue 10th Aug 2021, 5:14am
Actions: 
Login-to-reply

Thanks for your great reply Lewis.

Hopefully we can encourage more students to answer each others' questions, here, by offering their 
suggestions and success-stories.

How to actually open rotate.c

photo
From: ANONYMOUS  O.P.
Date: Tue 10th Aug 2021, 12:49pm
Actions: 
Login-to-reply

"Lewis Hellewell" <22*4*9*[email protected]*u*e*t*u*a*e*u*a*> wrote:

> ANONYMOUS wrote:
> 
> > Hey,
> > 
> > I've got a few questions that I need clarifying;
> > 
> > 1) When using ubuntu, do I use it through powershell (I use Microsoft) and docker 
> > desktop, or do I directly use it on ubuntu? (Could be a confusing question but I 
> > honestly have confused myself siginificantly)
> > 
> > 2) I downloaded VIM, supposedly the improved version of Vi, how do I open the rotate.c 
> > file through VIM?
> > 
> > 3) Depending on the answers to the other questions, this one may be negligent but do I 
> > run an ubuntu (myubuntu) container on powershell then supposedly access the rotate.c 
> > file through VIM on powershell, and if so how do I access files on my laptop in the 
> > terminal?
> > 
> > Sorry if these questions have been asked before but I honestly don't know if the other 
> > questions I've seen are actually asking the same question, just cause I'm befuddled. 
> > Also I have done this:
> > https://teaching.csse.uwa.edu.au/units/CITS2002/labsheets/install-linux.php
> > 
> > Pretty much I'm confused on how to open the C file as to start editing it and 
> > executing it etc.
> > 
> > Thank you so much.
> 
> I'm not a lecturer or a lab facilitator so by all means I could be somewhat wrong.
> 
> 1) Confusing question but the idea if your intending to use docker is to run ubuntu using 
> docker through powershell. Docker is an application that you can interact with through ur 
> powershell, the docker application is quite interesting, it creates "images" (think of it as 
> a little portal) of different Operating systems (in our case, Ubuntu) within ur local/host OS 
> (yours being Windows). 
> 
> Within the images there are "containers" (I could be wrong but I imagine they are the 
> different user's of the OS), throughout the unit you can create new containers as you like, 
> or keep coming back to the same container so your files in that container can be interacted 
> with each session. You will be using your powershell to communicate with docker through 
> commands and open your little Ubuntu portal, in this portal you should be doing your software 
> development in this unit.
> 
> 2) Navigate to the folder holding rotate.c through your powershell and then type "vim 
> rotate.c" to edit the file. However, as stated before this file should be within your 
> container, you can do this by using docker commands to copy or simply creating a new c file 
> in the container and copy and pasting the text.
> 
> 3) This question is also confusing and I think it's important to understand the role of 
> certain tools we are using:
> Docker - application we use to create images of other OS within our host OS, with each 
> container representing a different user (with different folders) of those images
> VIM - a simple text editor
> Powershell - a command driven application that we use to communicate to our OS and it's 
> applications.
> 
> With that in mind, through powershell we communicate to our docker application and instruct 
> it to open our myubuntu container ("portal"). Once opened the prompt will change to "root" 
> with a bunch of numbers/letters indicating the powershell is now communicating to the 
> container. We then can create our own files in this container, including rotate.c, we can use 
> VIM to create such files since it is a text editor (high level software language files are 
> essentially just text files with special syntax). Once done you can simply exit your 
> container by communicating through powershell to the docker container, putting you back onto 
> your host OS command-line (powershell).
> 
> I've ommitted specific commands used etc because it would take ages laying them all out, what 
> helps is understanding what each tool use is, and then researching how to do certain tasks 
> that are in each tools breadth. Such as opening and editing a file in vim, or navigating to a 
> different folder in powershell, or creating a new container in your docker container.
> 
> Hope this helps.

Appreciate it, helps a lot more than you think.

Thanks a lot!

How to actually open rotate.c

photo
From: Amitava D.
Date: Wed 11th Aug 2021, 9:35am
Actions: 
Login-to-reply

Great reply Lewis!
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  8:37am Nov 14 2021