Skip to content

Latest commit

 

History

History
153 lines (115 loc) · 7.23 KB

C language Learning Linux.md

File metadata and controls

153 lines (115 loc) · 7.23 KB

C learning

2021.02.6

Linux internet extremely slow issue fixed:

important strategy to use:

sudo -i gedit /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

change the internet portal to 2 instead of 3, then the internet speed should have a big improment.
Ubuntu 20.04 Network Performance Extremely Slow

Vim install

Text editor Vim

internet speed test:

main refernece:
speedtest-cli
How to resolve “dpkg: error processing /var/cache/apt/archives/python-apport_2.0.1-0ubuntu9_all.deb”?
speedtest-cli – Internet Speed Test In Linux Terminal
http://www.linuxandubuntu.com/home/speedtest-cli-internet-speed-test-in-linux-terminal

Main reference:

Fix very slow Internet on Ubuntu 18 easily.

Reference:

linux下网速慢,但是在windows下网速正常,请问什么原因。?
Ubuntu 16.04 minimal - extremely slow internet connection
Linux: Prefer IPv4 over IPv6 in dual-stack environment (and prevent problems when only IPv4 exists)

Video content learning:

1.Do not forget to add the semicolon at the end of the code; 2.if you want to add the \n, make sure it is inside of the dobuble quote;

Main refernce:
Mike Dane C playlist

Book Reading learning:

1.finish the short chapter first time;
2.write down the key content list in the code block;
3.write down the code according to your understanding;
4.If you get stuck during writing the code, then go back to the certain paragraphs to look for the answer or borrow the power of the search engine; 5.Document down the diffcult part to the code reading, then Save the code into the github file;

Refinde boot install:

sudo add-apt-repository ppa:rodsmith/refind && sudo apt update && sudo apt install refind && sudo refind-mkdefault

Uninstall How to remove rEFInd drivers completely from my ubuntu?
Uninstalling rEFInd

2021.02.05 C learning Reading Note:

install the brave browser:

Unable to locate package brave-browser on Ubuntu 18.04.1 LTS (lubuntu)

Bug fixing:

How To Fix Could Not Get Lock /Var/Lib/Dpkg/Lock Error On Ubuntu

Main reference:
C Programming Language, 2nd Edition by Brian W. Kernighan, Dennis M. Ritchie.pdf
The C Programming Language,Second Edition:

Reference:
Learning Material:
如何学好C语言 C - Programming Language | Tutorial
Algorithms in C(Robert Sedgewick).pdf
CS50 2019 - Lecture 1 - C

Compile the windows C Program

Bug fixing:
1.E: Unable to locate package mingw32, Linux Mint
2. 12 C Programming Cross Compiling for Windows On Linux

sudo apt-get install mingw64-binutils mingw64-runtime

Main reference:
Ubuntu cross compilation for Windows

install code blocks

How to Install Code Blocks on Ubuntu 16.04, Ubuntu 18.04, 19.04

1.C Language learning:

  1. Terminal method:
$ gcc sampleProgram.c -o sampleProgram
$ ./sampleProgram

How to Write and Run a C Program in Linux
2. Visual Studio:
Method 2: How to run C programs in Linux using a code editor like Visual Studio Code
3. Mix way: 1.First, you need to use the Visual studio to compile the c project file;

2.Second, you cd the project file into the terminal;

cd '/home/glenn/Programs/hello'
  1. Use command to check the result:
/.hello

2.project guide learning

1. Run the online Project in the local:

1.First, you need to use the Visual studio to compile the c project file;

2.Second, you cd the project file into the terminal;

cd '/home/glenn/Programs/hello'
  1. Use command to check the result:
/.hello

Main Reference
beginners-C-program-examples/Addition.c

2.Other Project:

gcc number.c -o number -lm

Main references:
beginners-C-program-examples/combine_calculator.c
Compiling C program with math.h library in Linux.

References:
Top 7 Exciting Project ideas in C For Beginners [2021]
C Project Based Tutorials?
50+ C/C++ Projects with Source Code

3.Can not see the wifi in the Linux system:

  1. First you need to use the blutooth only to share internet to the PC.
  2. Run the code below to install the external drive:
sudo lshw -C network
sudo apt remove broadcom-sta-dkms bcmwl-kernel-source
sudo apt install firmware-b43-installer
  1. Reboot the computer to see the wifi symbol;

How to Fix no Wireless Network Issue in Ubuntu Linux