设为首页 收藏本站
查看: 593|回复: 0

[经验分享] Linux下C编程入门(1)

[复制链接]

尚未签到

发表于 2017-11-17 18:33:57 | 显示全部楼层 |阅读模式
  Linux系统的介绍(以下以Manjaro最新版为例子):
  一、系统的安装:
  1、可以直接使用U盘做一个live usb的启动盘,在bios中设置从U盘启动即可拥有linux系统,如果是新式bios需要将secrut boot设置项关掉,按照向导操作即可。
  2、可以借助虚拟机体验,安装virtual box最新版本,注意系统的版本(32位还是64位),倒入我给你们的安装好的镜像文件,直接导入,启动运行即可。
  3、可以安装win10的linux子系统,简单体验即可,只是以后的命令稍有不同。
  4、可以使用物理机直接安装,这个可以向周围人求助,也可以到网上求助,我的学生可以直接找我,安装加配置过程大概需要1~2个小时即可。
  二、系统配置:
  1、配置软件的命令,须使用root权限:
  (1)、vi  /etc/pacman.d/mirrorlist 文件,大概如下:                    配置软件源,加快下载和安装的速度,选择自己最快的软件源即可。



  1 ##
2 ## Manjaro Linux default mirrorlist
3 ## Generated on 2017-10-28 05:27
4 ##
5 ## Please use 'pacman-mirrors -f NUMBER' to modify mirrorlist
6 ## (Use 0 for all mirrors)
7 ##
8
9 ## Country : China
10 Server = http://mirrors.tuna.tsinghua.edu.cn/manjaro/stable/$repo/$arch
11
12 ## Country : China
13 Server = https://mirrors.ustc.edu.cn/manjaro/stable/$repo/$arch
14
15 ## Country : Japan
16 Server = http://ftp.tsukuba.wide.ad.jp/Linux/manjaro/stable/$repo/$arch
17
18 ## Country : France
19 Server = http://kibo.remi.lu/stable/$repo/$arch
20
21 ## Country : Australia
22 Server = http://manjaro.mirror.serversaustralia.com.au/stable/$repo/$arch
23
24 ## Country : United_Kingdom
25 Server = http://manjaro.mirrors.uk2.net/stable/$repo/$arch
26
27 ## Country : Belarus
28 Server = http://mirror.datacenter.by/pub/mirrors/manjaro/stable/$repo/$arch
29
30 ## Country : United_States
31 Server = http://mirror.dacentec.com/manjaro/stable/$repo/$arch
32
33 ## Country : United_States
34 Server = http://mirror.solarvps.com/manjaro/stable/$repo/$arch
35
36 ## Country : Hungary
37 Server = http://mirror.infotronik.hu/mirrors/pub/manjaro/stable/$repo/$arch
38
39 ## Country : Indonesia
40 Server = http://kambing.ui.ac.id/manjaro/stable/$repo/$arch
41
42 ## Country : Portugal
43 Server = http://manjaro.barata.pt/stable/$repo/$arch
44
45 ## Country : Taiwan
46 Server = http://free.nchc.org.tw/manjaro/stable/$repo/$arch
47
48 ## Country : Bulgaria
49 Server = http://manjaro.telecoms.bg/stable/$repo/$arch
50
51 ## Country : Austria
52 Server = http://mirror.inode.at/manjaro/stable/$repo/$arch
53
54 ## Country : Indonesia
55 Server = http://kartolo.sby.datautama.net.id/manjaro/stable/$repo/$arch
56
57 ## Country : Germany
58 Server = http://mirror.ragenetwork.de/manjaro/stable/$repo/$arch
59
60 ## Country : United_Kingdom
61 Server = http://mirror.catn.com/pub/manjaro/stable/$repo/$arch
62
63 ## Country : Spain
64 Server = http://ftp.caliu.cat/manjaro/stable/$repo/$arch
65
66 ## Country : Hong_Kong
67 Server = http://ftp.cuhk.edu.hk/pub/Linux/manjaro/stable/$repo/$arch
68
69 ## Country : Australia
70 Server = http://manjaro.melbourneitmirror.net/stable/$repo/$arch
71
72 ## Country : South_Africa
73 Server = http://mirror.is.co.za/mirrors/manjaro.org/stable/$repo/$arch
74
75 ## Country : United_States
76 Server = https://mirrors.ocf.berkeley.edu/manjaro/stable/$repo/$arch
77
78 ## Country : Germany
79 Server = https://mirror.netcologne.de/manjaro/stable/$repo/$arch
80
81 ## Country : United_States
82 Server = https://mirror.clarkson.edu/manjaro/stable/$repo/$arch
83
84 ## Country : United_Kingdom
85 Server = https://www.mirrorservice.org/sites/repo.manjaro.org/repos/stable/$repo/$arch
86
87 ## Country : Netherlands
88 Server = https://manjaro.mirror.wearetriple.com/stable/$repo/$arch
89
90 ## Country : United_States
91 Server = https://mirror.math.princeton.edu/pub/manjaro/stable/$repo/$arch
92
93 ## Country : Chile
94 Server = http://manjaro.dcc.uchile.cl/stable/$repo/$arch
95
96 ## Country : Denmark
97 Server = https://www.uex.dk/repos/manjaro/stable/$repo/$arch
98
99 ## Country : Bulgaria
100 Server = https://manjaro.ipacct.com/manjaro/stable/$repo/$arch
101
102 ## Country : Germany
103 Server = https://mirror.alpix.eu/manjaro/stable/$repo/$arch
104
105 ## Country : Canada
106 Server = https://osmirror.org/manjaro/stable/$repo/$arch
107
108 ## Country : Belgium
109 Server = https://manjaro.cu.be/stable/$repo/$arch
110
111 ## Country : Netherlands
112 Server = https://nl.mirror.babylon.network/manjaro/stable/$repo/$arch
113
114 ## Country : France
115 Server = https://fr.mirror.babylon.network/manjaro/stable/$repo/$arch
116
117 ## Country : Russia
118 Server = https://mirror.yandex.ru/mirrors/manjaro/stable/$repo/$arch
119
120 ## Country : Czech
121 Server = https://mirror.dkm.cz/manjaro/stable/$repo/$arch
122
123 ## Country : Romania
124 Server = http://mirrors.serverhost.ro/manjaro/packages/stable/$repo/$arch
125
126 ## Country : Ecuador
127 Server = https://mirror.cedia.org.ec/manjaro/stable/$repo/$arch
128
129 ## Country : Costa_Rica
130 Server = https://mirrors.ucr.ac.cr/manjaro/stable/$repo/$arch
131
132 ## Country : United_Kingdom
133 Server = http://repo.manjaro.org.uk/stable/$repo/$arch
134
135 ## Country : Germany
136 Server = https://manjaro-mirror-a.alpix.eu/stable/$repo/$arch
137
138 ## Country : Denmark
139 Server = https://mirrors.dotsrc.org/manjaro/stable/$repo/$arch
140
141 ## Country : Germany
142 Server = https://repo.rhindon.net/manjaro/stable/$repo/$arch
143
144 ## Country : Germany
145 Server = http://babyname.tips/mirrors/manjaro/stable/$repo/$arch
146
147 ## Country : Germany
148 Server = http://ftp.tu-chemnitz.de/pub/linux/manjaro/stable/$repo/$arch
149
150 ## Country : Singapore
151 Server = https://download.nus.edu.sg/mirror/manjaro/stable/$repo/$arch
152
153 ## Country : France
154 Server = http://ftp.free.org/mirrors/repo.manjaro.org/repos/stable/$repo/$arch
155
156 ## Country : Netherlands
157 Server = https://mirror.koddos.net/manjaro/stable/$repo/$arch
158
159 ## Country : Germany
160 Server = https://ftp.halifax.rwth-aachen.de/manjaro/stable/$repo/$arch
161
162 ## Country : Turkey
163 Server = http://ftp.linux.org.tr/manjaro/stable/$repo/$arch
164
165 ## Country : Ireland
166 Server = https://ftp.heanet.ie/mirrors/manjaro/stable/$repo/$arch
167
168 ## Country : Portugal
169 Server = http://ftp.dei.uc.pt/pub/linux/manjaro/stable/$repo/$arch
170
171 ## Country : Netherlands
172 Server = https://ftp.nluug.nl/pub/os/Linux/distr/manjaro/stable/$repo/$arch
173
174 ## Country : Netherlands
175 Server = http://ftp.snt.utwente.nl/pub/linux/manjaro/stable/$repo/$arch
176
177 ## Country : Sweden
178 Server = https://ftp.lysator.liu.se/pub/manjaro/stable/$repo/$arch
179
180 ## Country : Germany
181 Server = https://mirror.netzspielplatz.de/manjaro/packages/stable/$repo/$arch
  文件说明:
  (1)、以#开始的行都是被注释掉的,文件在被解析时是无用的
  (2)、容易看出前7行都为注释
  (3)、第9行## Country : China虽然是注释行,表明以下是中国的内容
  (4)、第10行Server = http://mirrors.tuna.tsinghua.edu.cn/manjaro/stable/$repo/$arch文件主要有
  a、Server=设置Server变量,内容在赋值符号右边
  b、http://mirrors.tuna.tsinghua.edu.cn说明使用清华大学的的镜像服务,九江的访问不够稳定
  c、manjaro对应的linux镜像名称与发行版本名称一致
  d、stable说明使用的稳定源,可以是testing或unstable源,有风险
  e、后面的$repo/$arch就是套路,知道有这个内容就行了
  (5)、我一般使用中国科大的软件源,但是清华的源是第一个,只要将第10行注释掉,也就是在行首加上个#就好了
  (6)、这样实际起作用的就是第13行代码,其他依次类推,更加激进的是将不需要的行全部删除即可。
  2、软件更改(需要有root的权限):
  (1)、在线安装软件:pacman -S vim
  (2)、离线安装软件:pacman -U vim
  (3)、查询系统软件:pacman -Q vim
  (4)、删除已装软件:pacman -R vim
  (5)、升级全部软件:pacman -Syyu
  3、安装必备的软件:
  (1)、开发工具:gcc make gdb 前面三个必须,kdgb netbeans  okteta  bless选装等
  (2)、编辑工具:vim kate atom vscode等任选一个即可
  (3)、其他工具:qstardict字典翻译  kicad电路制版  umlet uml设计工具 arduino世界级的单片机开发工具 Fritzing开源的软件仿真工具
  (4)、教育软件:Ktouch Ktuitle step等
  (5)、游戏软件:0AD实时战争类 Wesnoth策略类 Chromium-bsu射击类游戏 SuperTux竞速类游戏 Ksudoku 数独游戏  pingus儿童类游戏 frozen bubble泡泡龙,assaultcube枪战类游戏相当不错 Xonotic也不错
  (6)、其他推荐:chromium游览器的王者 firefox浏览器的万能 smplay看电影和听音乐的选择  kodi linux下的多媒体中心  VLC也不错  deepin-screen-recorder深度录屏工具也不错  simplescreenrecorder也不错

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-407998-1-1.html 上篇帖子: linux alias使用 下篇帖子: java执行cmd命令和linux命令
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表