/g/ installed Linux Debian. How can I write code, compile and run it from terminal (I don't want to touch mouse).
bumping my own thread
>>52212761
What language nigger?
>>52212761
What language faggot?
>>52213743
To code you can use Nano or Pico.
To compile use g++
To execute ./
There is no need to use mouse for that
>>52213793
Thanks. Now fuck off mouse
>>52213821
I recomend learning vim. Once you git gud it becomes painfully slow using anything else.
>>52212761
>>52213793
also possible to use any other editor of your choice, like vim or emacs or ed.
>>52213842
will try it too
>>52213793
hey how to save your master piece in nano?
first install GNU C/C++ compiler
$ sudo apt-get update
$ sudo apt-get install build-essential manpages-dev
You might already have it on debian, at least you do on ubuntu... Check it with:
$ whereis gcc
$ which gcc
$ gcc --version
Then write your code using a text editor like VI, Emacs, Sublime Text, Textadept or what ever text editor. Some of these have quite a learning curve, but you can use any. And you can configure the stuff you want in them. Sublime text is the most modern looking and one of the easiest while still having tons of customization, but it is not fully terminal based like vi, emacs or nano.
After that just write
$ gcc program-source-code.c -o executable-file-name
or assuming that executable-file-name.c exists
$ make executable-file-name
If you get no errors everything should be fine and you can verify it with
$ ls
and you can run it with
$ ./executable-file-name
where "./" just means "this folder". My picture shows a example demo.
>>52213916
>>52213916
Ctrl + O to save
Ctrl + X To exit
>>52213992
Thanks
>>52213888
Try first with nano or pico are easy and simple to use , dont fuck around with vi if you are learning or you will finish the day killing yourself or worst going back to windows
hey how can i display the output properly ?
>>52214148
Post your code of your printf or cout , probably you just need to add an endofline and thats it
>>52214225
thanks. Anything else i need to know before i ask some more shitty question.
>>52212761
1.install g++/clang
2.install vim or emacs
3.fuck off
>>52214148
also get a shell that doesn't suck, zsh will automatically resume prompt on a new line if the last run command doesn't explicitly end in one.