forked from obonaventure/SystInfoBlog
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Essaie de Pull Request (issue #23) #26
Open
AndruOn
wants to merge
7
commits into
UCL-INGI:master
Choose a base branch
from
AndruOn:AndruOn-patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
83df9a2
init
AndruOn 663acca
pour Ubuntubash on windows
AndruOn df1c4c2
code in readme
AndruOn f76d53a
better orga
AndruOn 5cb52ee
correction du formatage md
AndruOn 7789e5f
retirer file sans .md
AndruOn e9aa68b
Update 2020-05-02-bash-on-Windows.md
AndruOn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
layout: post | ||
title: Terminal Ubuntu sur Windows | ||
author: Andru Onciul | ||
--- | ||
Ce petit montre une manière d'éxecuter du code C depuis Windows sans passer par Virtualbox. | ||
|
||
## Installer Ubuntu | ||
|
||
1. Installer Ubuntu depuis le Windows Store | ||
|
||
![Publish]({{ site.baseurl }}/images/UbuntuWindowsStore.png) | ||
|
||
1.1. Si cette erreur apparait: | ||
|
||
![Publish]({{ site.baseurl }}/images/ErreurSubSystemComponent.png) | ||
|
||
taper cette ligne dans le powershell de windows (executer en tant que administrateur sinon cela ne marchera pas): | ||
```Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux``` | ||
|
||
2. une fois ubuntu installé : | ||
|
||
2.1 choisir un username (minuscule sans espaces) | ||
|
||
2.2 un code (à ne pas perdre) | ||
|
||
## Taper ces lignes de commandes dans Ubuntu | ||
|
||
Pour la première fois sur le bash il va falloir installer le compilateur ainsi que | ||
toutes les librairies qui seront utilisées dans les codes qui seront compilés. | ||
Ces lignes de commandes ne devront être tapées que la première fois (tout reste installé même si le bash ubuntu est fermé) | ||
|
||
```bash | ||
sudo apt-get update #update toutes les libraires | ||
# ubuntu demande le code du l’utilisateur du pc il suffit de le tapper et taper ENTER | ||
sudo apt-get install build-essential #compilateur et debug (notamment commande gcc) | ||
sudo apt-get install make #pouvoir utiliser des make | ||
sudo apt-get install manpages-dev #documentation | ||
``` | ||
|
||
Voici quelques librairies indispensables pour le projet à vous d'en mettre plus si besoin. | ||
Il suffit de taper ubuntu install "nom de la librairie sur google" pour trouver la commande a taper | ||
|
||
```bash | ||
sudo apt-get install valgrind #valgrind | ||
sudo apt-get install cppcheck #cppcheck | ||
sudo apt-get install libcunit1 libcunit1-doc libcunit1-dev #cunit | ||
sudo apt-get install zlib1g-dev #librairies et headers | ||
``` | ||
|
||
Maintenant pour accéder au dossier de votre projet | ||
|
||
```cd /mnt/c #va sur le disque dur C: du pc``` | ||
![Publish]({{ site.baseurl }}/images/mountCs.png) | ||
|
||
Vous êtes maintenant sur les fichiers du disque dur (C:) principal de votre PC. | ||
Vous pouvez utiliser dans ce bash comme le bash d'un système UNIX puisque c'en est un. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Vous pouvez utiliser cet interpréteur bash comm ... |
||
|
||
## Exécuter la commande du makefile comme dans un terminal Linux | ||
|
||
Maintenant il vous suffit d’ouvrir Ubuntu et de taper ceci à chaque fois que vous voulez lancer votre code : | ||
|
||
```bash | ||
cd /mnt/c #va sur le disque dur C: du pc | ||
cd “fichier ou ya le projet” #rentre dans le bon fichier | ||
make fact | ||
./fact -N 4 input.txt output.txt | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ce petit exemple