如何在Ubuntu编写运行C语言
0阅读
1.准备工作(检查网络&更新源)
ping www.baidu.com
services.msc
VMware DHCP Service
VMware NAT Service
sudo apt update
2.ssh
sudo ps -e |grep ssh
sudo apt install openssh-server
sudo ps -e |grep ssh
service ufw stop
sudo apt install net-tools
ifconfig
3.gcc g++
sudo apt install gcc
sudo apt install build-essential
sudo apt install g++
4.vim
sudo apt install vim
5.测试
vim hello.c
gcc -Wall hello.c -o hello
gcc hello.c -o hello
./hello
6.切换用户
sudo passwd root
su root
sudo adduser he
sudo deluser he
w
#include<stdio.h>
int main(void)
{
printf("hello world!\n");
return 0;
}