update readme.md
This commit is contained in:
parent
19b85030b4
commit
bb5bcedf43
1 changed files with 37 additions and 31 deletions
68
README.md
68
README.md
|
@ -1,4 +1,10 @@
|
|||
## Important-Linux-commands
|
||||
# Table of Contents
|
||||
1. [Important-Linux-commands](#Important-Linux-commands)
|
||||
2. [getting some INFO about the system](#getting some INFO about the system)
|
||||
3. [cool programs you find on almost all linux](#cool programs you find on almost all linux)
|
||||
|
||||
|
||||
# Important-Linux-commands
|
||||
|
||||
The commands which make life in cyberspace easier.
|
||||
|
||||
|
@ -8,19 +14,19 @@ projecting code in your mind from your mind.
|
|||
You are a specific point on some system, when you are in the shell.
|
||||
you can see what is in the directory you are with the command
|
||||
|
||||
# ls
|
||||
## ls
|
||||
|
||||
this command also can display other useful information. Of what is inside the directory
|
||||
you are in.
|
||||
|
||||
# cd
|
||||
## cd
|
||||
|
||||
The most important one.
|
||||
Instead to click, you change directories via command.
|
||||
that makes it possible to jump from one point to the other, especially with autocompletion.
|
||||
|
||||
|
||||
# man
|
||||
## man
|
||||
|
||||
In general you can get the manual entries for each of the programs described here and much more.
|
||||
|
||||
|
@ -33,7 +39,7 @@ or type
|
|||
|
||||
and you will get the manual opened historically with nano or less.. not sure, both good old editors.
|
||||
|
||||
# cp
|
||||
## cp
|
||||
|
||||
copy files from one place to another. (relatively from you)
|
||||
|
||||
|
@ -43,7 +49,7 @@ when there is already file1.py in the destination directory, it gets overwritten
|
|||
|
||||
|
||||
|
||||
# Concept of piping with >
|
||||
## Concept of piping with >
|
||||
|
||||
in the shell you have standard input and standard output.
|
||||
Nothing more.
|
||||
|
@ -61,26 +67,26 @@ you can use >> instead. Writing it like this:
|
|||
This both is piping. There is another very important aspect of piping described later.
|
||||
|
||||
|
||||
# mkdir
|
||||
## mkdir
|
||||
|
||||
another basic command.
|
||||
Create a new directory ("make dir")
|
||||
|
||||
|
||||
# su
|
||||
## su
|
||||
|
||||
stands for super user.
|
||||
use it to become super user.
|
||||
then the symbol in your shell changes from $ which means you are normal user to # which is the sysmbol of being superuser, or in other words: root.
|
||||
|
||||
|
||||
# sudo
|
||||
## sudo
|
||||
|
||||
this is a program you can put in front of commands, to get the superuser for only this command, typing your password of course.
|
||||
then for other x times writing sudo, you can issue commands as superuser without even typing in a password.
|
||||
|
||||
|
||||
# alias
|
||||
## alias
|
||||
|
||||
|
||||
give your complicated commands easy remember commands.
|
||||
|
@ -98,7 +104,7 @@ to get the configuration loaded. On other linux there will be an analogon.
|
|||
|
||||
|
||||
|
||||
# cat
|
||||
## cat
|
||||
|
||||
print out what you have in front of you on the standard output.
|
||||
|
||||
|
@ -109,7 +115,7 @@ for instance:
|
|||
cat doc1.txt doc2.txt > doc1ANDdoc2.txt
|
||||
|
||||
|
||||
# chown
|
||||
## chown
|
||||
|
||||
On linux everything are only directories and (txt)files.
|
||||
All these objects have an owner, or also multiple ones.
|
||||
|
@ -118,7 +124,7 @@ All these objects have an owner, or also multiple ones.
|
|||
|
||||
gives root the ownership of kp.txt
|
||||
|
||||
# chmod
|
||||
## chmod
|
||||
|
||||
Every owner then has file permissions. That means he can read write or x (do) something.
|
||||
he can do all of them or some of them or none of them. Thats defined in codes, 777 gives them all and 660 doesnt completely.
|
||||
|
@ -132,11 +138,11 @@ bzw
|
|||
|
||||
Just look it up what people say regarding permissions and certain directories.
|
||||
|
||||
# history
|
||||
## history
|
||||
|
||||
this lists all the commands of the shell you are in, that you have typed in lastly.
|
||||
|
||||
# grep
|
||||
## grep
|
||||
|
||||
|
||||
if you have some bigger output of some of the former commands for example. Or whatever big output. then use grep to filter out the lines that have a certain word in it.
|
||||
|
@ -148,7 +154,7 @@ is pretty cool. It searches you all the files recursively from your point in cyb
|
|||
|
||||
|
||||
|
||||
# piping with |
|
||||
## piping with |
|
||||
|
||||
here comes into account the piping with |.
|
||||
|
||||
|
@ -163,7 +169,7 @@ as the output of history gives one command per line, grep will filter out exactl
|
|||
# getting some INFO about the system
|
||||
|
||||
|
||||
# df
|
||||
## df
|
||||
|
||||
prints you out disc usage of your hardware
|
||||
|
||||
|
@ -172,7 +178,7 @@ prints you out disc usage of your hardware
|
|||
does it in humanreadable
|
||||
|
||||
|
||||
# du
|
||||
## du
|
||||
|
||||
prints out the size of files around you
|
||||
|
||||
|
@ -181,17 +187,17 @@ prints out the size of files around you
|
|||
prints in human readable with depth 2, that means in the directories and in their subdirectories.
|
||||
|
||||
|
||||
# lsblk
|
||||
## lsblk
|
||||
|
||||
prints you out all the hardware devices with memory
|
||||
|
||||
|
||||
# htop respectively top
|
||||
## htop respectively top
|
||||
|
||||
gives you a terminal graphics programm interface to see all running processes
|
||||
|
||||
|
||||
# tail -f
|
||||
## tail -f
|
||||
|
||||
with tail or also head, you can print out the last or the first lines of a file
|
||||
|
||||
|
@ -199,7 +205,7 @@ When you use tail -f, you get a stream of the documents last lines.
|
|||
|
||||
Thats perfect for some log files that get written.
|
||||
|
||||
# journalctl -f
|
||||
## journalctl -f
|
||||
|
||||
this gives you a stream of the kernel messages, which are pretty a lot about a lot of different topics of the programs on your machine.
|
||||
|
||||
|
@ -207,11 +213,11 @@ The kernel is the ground software, running the hardware of the proper materia de
|
|||
Its mostly in C.
|
||||
C is like the base of all languages. (if its not assembly)
|
||||
|
||||
# uname (-a or -r or other)
|
||||
## uname (-a or -r or other)
|
||||
|
||||
gives you general infos about system, OS, and stuff
|
||||
|
||||
# systemctl
|
||||
## systemctl
|
||||
|
||||
some people do not like systemctl.
|
||||
I personally have parts of my structures that are managed by this software.
|
||||
|
@ -222,34 +228,34 @@ with
|
|||
I ask systemctl to give me the status of the nginx daemon, running in the background of my (and actually all of my machines there is running one nginx daemon) machine.
|
||||
|
||||
|
||||
## cool programs you find on almost all linux
|
||||
# cool programs you find on almost all linux
|
||||
|
||||
|
||||
# ssh
|
||||
## ssh
|
||||
|
||||
with ssh, the secure shell, you can be on other computers worldwide connected to the internet.
|
||||
its basically the same thing as getting the standard shell programm of the system running the ssh daemon. but almost all systems do that as a standard
|
||||
|
||||
# scp
|
||||
## scp
|
||||
|
||||
thats copying from one computer to the other with the ssh protocol
|
||||
|
||||
# rsync
|
||||
## rsync
|
||||
|
||||
better than scp because it can easily recover when something bad happens during the up or download of something big. from its syntax ssh alike.
|
||||
|
||||
# vnc
|
||||
## vnc
|
||||
|
||||
is like ssh but for video
|
||||
|
||||
# torify
|
||||
## torify
|
||||
|
||||
the freedom of the internet is not a joke.
|
||||
with torify you can tunnel other programs over tor.
|
||||
with tor, with systemctl status/start/stop tor.service, with reading and writing the torrc (THE configuration file of tor) you can easily host a knot point or a bridge.
|
||||
Just understanding a lot about tor is already helping a lot for our freedom.
|
||||
|
||||
# ncat
|
||||
## ncat
|
||||
|
||||
on linux OSes, or probably also on other computers, a lot of things are organised in so called ports.
|
||||
|
||||
|
|
Loading…
Reference in a new issue