Common commands under ubuntu

1, sudo can use super permissions

2, ctrl+alt+T to open the command box

3, nano is to open and create a file {and gedic command and vi command}

4. Compile the c program: gcc -o test 1.c {where 1.c is the file name}

      Compile the C++ program: g++ -o test 1.c

[Then after the compilation is completed, a diamond-shaped file will be generated in the file, which is the executable file]

5 , rm -r 1.c

{that is, delete the file 1.c}

6,./1.c

{is to execute this command}

7. For python, it is much simpler.

  After creating the file, enter "python 1.py" directly in the command box to run the file directly

8, find -name haha.

You can find all the files named "haha" in the computer.

9,cat text.c

Just don't open it, you can view your test.c, the content of this file.

10,cat test.c test.cpp >test1.txt

 It is to combine the contents of the two files test.c and test.cpp and then add them to the file test1.txt

11. cd folder

enter a folder

12,cd ~

 back to desktop

13,$

  This is the variable symbol

E.g:


14, put all files under one file



15. If the camera cannot be turned on, check whether the corresponding number of the camera is different

16,mkdir aa

is to create a folder named aa

17, mv move

mv can only operate on one folder

18,cp

cp -r new1 new2

Copy to new1 to new2

19. Check the version of python

python

import cv2

print cv2.--version--



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325446878&siteId=291194637