E3 Linux System Installation and Basic Usage
Install a Linux operating system
We will reuse the content from the PA lecture notes. Please install the Linux operating system according to PA0.
Obtain the ‘One Student One Chip’ framework code.
When you read the PA0 lecture notes and reach the section on obtaining the PA framework code, a prompt box will appear asking you to return to this section of the lecture notes.
First, please add an SSH key to your GitHub account. For detailed instructions, STFW. Then, use the following command to clone the framework code for 'One Student One Chip':
git clone -b master git@github.com:OSCPU/ysyx-workbench.git
Once you've cloned the repository, you can return to the corresponding section of the PA lecture notes and continue reading. However, please pay attention to the following points:
- Treat
ysyx-workbench
as the project directory referred to in the PA lecture notes — in other words, think of ics2022 in the PA lecture notes as being replaced byysyx-workbench
- When change the student number and name in
ysyx-workbench/Makefile
, you can leave the student number unchanged until you have completed the preliminary. This jumping back and forth may cause you some trouble, but the reason we do it this way is that we want to manage the documentation as if it were code: we want to do something likeThe "One Student One Chip" handout calls the PA handout
,so we mention as little as possible about the "One Student One Chip" project in the PA handout, and put all the "One Student One Chip" content in the "One Student One Chip" handout itself. Failure to follow this principle not only makes it difficult for us to maintain the lecture notes, but also makes it difficult for people to know where to look for relevant content when reading the lecture notes.
Installing an OS is the easiest training for independent problem solving
If you are installing and using Linux for the first time, you may encounter a lot of problems. Don't worry, since Linux is used all over the world, there is a high probability that the problems you have encountered have been encountered by other people, and searching for keywords on the Internet will most likely lead you to a solution.
Establishing the right values and maximizing the training you get.
In fact, you can always get around these drills with a little ingenuity, such as
- Use someone else's VM image or a one-click install and configuration script to accomplish the tasks in this subsection in a snap.
- Found the so-called PA guide on the Internet and happy that you don't need to study yourself.
- Getting the core code or code for previous "One Student One Chip" cohort from someone and call that study.
Some students will think, "Why can't I refer to other people's guides and codes? I know what I'm doing!" But from the training point of view, "understand" and "independent completion" is very different: do you know why the masters do this, rather than that? How many potholes have the masters stepped in, and what is the rationale behind these potholes, can you see it? You should think about what you have to lose as opposed to what you have to gain by just laying down and copying. The notion that "copying the right thing is a good thing" is a way of lowering your expectations is not in line with the values we are promoting.
In fact, if you're a beginner, these little witticisms can cause devastating damage to your training:
- You're referencing things that you shouldn't be referencing at this stage, and they become the upper boundary of your learning, because you're barely aware of what's wrong with them, which makes it almost impossible for you to do better than them.
- And it gives you the illusion that "I'm a good learner, I'm good at learning," and you don't try, and you don't know how to do it better.
- Worse, you don't get the training you need now, but in the future you'll always be faced with new problems for which there's no cheat sheet or reference code, and you won't be able to solve them.
But to be honest, the TA team has almost no effective way to prohibit people from playing smart. In fact, it's more a matter of recognizing and enforcing them from the bottom of your heart: when you find some so-called cheat sheets, you should think to yourself that "reading them will reduce the effectiveness of the training", and then you voluntarily reject their temptation and insist on completing the experiments on your own. It's similar to the way we all recognize academic integrity: you know it's wrong to cheat on an exam, and then you take it upon yourself to complete the exam independently.
Indeed, academic integrity goes far beyond not cheating on exams, and we recommend reading MIT's interpretation of academic integrity, especially [Academic integrity in writing code](http://integrity.mit.edu/handbook/writing- code). Here, we quote some sample statements.
- When the handout asks to "implement X", you must implement X independently without reusing any external resources.
- Sharing code and exchanging test cases are both inappropriate.
You may think these requirements are out of line, but these guidelines are ultimately designed to get you the results you want: don't forget that you're learning to improve, not delivering a program. If you stick with it, you can become a true professional.
Can I use other Linux distributions?
We don't make it mandatory to use a particular Linux distribution, so we often get questions like "will using xxx distro affect my experiments". First of all, please read the tips on distributions in PA0, but otherwise we probably can't give you a definitive answer, because we probably haven't used it.
In fact, if you decide to use a different distribution, you should be prepared to solve new problems on your own.
Learn Basic Linux Usage
We strongly recommend MIT's Linux tools tutorial series: The Missing Semester of Your CS Education. By studying these courses, you will learn how to use Linux tools to efficiently accomplish various tasks, which will significantly boost your work efficiency.
Required Topics:
- Course overview and the shell
- Shell Tools and Scripting
- Editors (Vim)
- Data Wrangling
- Command-line Environment
- Version Control(Git)
This includes reading the lecture notes and completing the exercises. Additionally, ideo lecturesare available on Bilibili for your reference.
Additional Linux Learning Resources
- The Art of Command Line this article summarizes many commonly used command-line tools and is worth reading.
- Linux101 written by the Linux Users' Association of the University of Science and Technology of China. You can select sections that interest you to read.