-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the linux101 wiki!
The goal is to help you become fimilar with the linux operating system. I'm by no means an expert - but I do hope that this helps.
Once you're finished reading this wiki, I hope you will know:
- How to navigate linux
- Where to look for header files, libraries and executables
- How to build and install c++ libraries in linux.
- The answers to the meaning of life itself.
I do not pretend to give you those answers - but I do hope you find them.
I'm sure there are 1000 linux one pagers out there on the most common command line tools, I imagine it's best to make your own and build up on it over time, until you realise most of it is second nature and you shrink it back down to the most obscure commands.
Below is a set of a few commands to get you started, moving directories and inspecting whats in them.
$ cd # change directory
$ ls # list items in your directory
$ rm # delete. rm -r - remove directory. rmdir (a safer alternative to remove empty directories)
$ touch # create an empty file
# mkdir # create an empty directory
$ echo <input> # write to standard out
$ cat <filename> #
$ chmod # change file/directory permissions
$ chown # change file/directory ownership
# Readme example
my_example_app <mode> [operations]Lets get our bearings around the linux root directory /. It will be different depending on which linux flavour you have,
but generally its the same. To start, lets broadly group the directories into categories.
├── bin
├── lib
├── usr
├── include
// These are most the things that define your linux system. ├── boot ├── proc ├── root ├── dev
This has information about how to start the system. Which drivers are required to load and in what order. It defines the capabilities of the platform that you are running on, how to load memory, display drivers etc. We have no need for it in this tutorial (other than relying on its operation), and in most cases you will never care about it (if it aint' broke).
The kernel (and other applications)
Every process you run in linux
// these are for mounted media such as USB's and harddrives. ├── media ├── mnt
├── etc ├── home ├── opt ├── sys ├── tmp
// lets ignore these ├── run ├── sbin ├── snap ├── cdrom └── var
bin, include, lib
cdrom, media
$ tree . -L 1
.
├── bin
├── boot
├── cdrom
├── dev
├── etc
├── home
├── include
├── lib
├── media
├── mnt
├── opt
├── proc
├── root
├── run
├── sbin
├── snap
├── sys
├── tmp
├── usr
└── varTLDR: When writing debug statements in code, write to stderr.
print("hello world", file=sys.stderr)std::cerr << "Hellow workd" << std::endl;echo "Hello world 1>&2