Linux (Debian's familly) important terminal commands

Not finish... and will never be... i will ad over time.

Linux terminal bloc notes!

# For the one look to virtualise linux on android forget it there is termux an open source project on github and they slowly transfert all linux apt to be installed on it : - ) it's downlodable on google play. And for the hacker (NO... i will repeate i'm not a hacker........) thinking ..mmm is there aircrack-ng on it.... (If you think about that you are not an hacker anyways you dont see my nightmare ;-) ) i think no but phone iface are not yet made to be in monitor mode so...

So.... #ls -a





arp :



  arp [-vn]  [] [-i ] [-a] []             <-Display ARP cache 

Use to get the arp cache data.

GENERAL USE : arp


        -a                       display (all) hosts in alternative (BSD) style
        -e                       display (all) hosts in default (Linux) style
        -s, --set                set a new ARP entry
        -d, --delete             delete a specified entry
        -v, --verbose            be verbose
        -n, --numeric            don't resolve names
        -i, --device             specify network interface (e.g. eth0)
        -D, --use-device         read  from given device
        -A, -p, --protocol       specify protocol family
        -f, --file               read new entries from file or from /etc/ethers






cat :



cat [option(s)] file(s)

    The cat command displays the contents of a file, printing the entire contents to the screen without interruption.




cd :



cd [options(s)] [directory]

    Changes the current directory. cd without any parameters changes to the user's home directory.




chgrp :



chgrp [option(s)] groupname file(s)

    Transfers the group ownership of a given file to the group with the specified group name.




chmod (change mod) :



chmod [options] mode file(s)

    Changes the access permissions.

    The mode parameter has three parts: group, access, and access type. group accepts the following characters:

    u

        user
    g

        group
    o

        others

    For access, access is granted by the + symbol and denied by the - symbol.

    The access type is controlled by the following options:

    r

        read
    w

        write
    x

        eXecute — executing files or changing to the directory.
    s

        Set uid bit — the application or program is started as if it were started by the owner of the file.


chmod tree
=============================================================================

 RIGHT           KEYSTOKE          NUMERICAL VALUE      BINARY VALUE

 no right        ---               0                       000
 only execute    --x               1                       001
 only write      -w-               2                       010
 write execute   -wx               3                       011
 read only       r--               4                       100
 read execute    r-x               5                       101
 read write      rw-               6                       110
 all right       rwx               7                       111


============================================================================= 

 And the chmod groups :

 ---             ---             ---             ---
 user            group           other           all

============================================================================= 


WhatIsMyIP@NS1:/# chmod 444 chmod.txt

WhatIsMyIP@NS1:/# ls -lh
1.2k

-r--r--r-- 1 www  www  1.2K Oct  8 15:53 chmod.txt





chown :



chown [OPTION]... [OWNER][:[GROUP]] FILE...

    Transfers the ownership of a file to the user with the specified user name.

    -R

        Changes files and directories in all subdirectories (recursive).


    -L

	traverse every symbolic link to a directory encountered(Shortcut).





cp :



cp [option(s)] sourcefile targetfile

    Copies sourcefile to targetfile(A cut and past).

    -r

        Copies recursively (includes subdirectories)





df :



df [option(s)] [directory]

    The df (disk free) command, when used without any options, displays information about the total disk space, the disk space currently in use, and the free space on all the mounted drives. If a directory is specified, the information is limited to the drive on which that directory is located.

    -h

        shows the number of occupied blocks in gigabytes, megabytes, or kilobytes — in human-readable format
    -t

        Type of file system (ext2, nfs, etc.)





diff :



diff [option(s)] fileA fileB

    The diff command compares the contents of any two files. The output produced by the program lists all lines that do not match.

    This is frequently used by programmers who need only send their program alterations and not the entire source code.

    -q

        Only reports whether the two given files differ




du :



du [option(s)] [path]

    This command, when executed without any parameters, shows the total disk space occupied by files and subdirectories in the current directory.

    -a

        Displays the size of each individual file
    -h

        Output in human-readable form
    -s

        Displays only the calculated total size




find :



find [option(s)]

    The find command allows you to search for a file in a given directory.




free :



free [option(s)]

    The command free displays information about RAM and swap space usage, showing the total and the used amount in both categories.

    -b

        Output in bytes
    -k

        Output in kilobytes
    -m

        Output in megabytes





grep :



grep [option(s)] searchstring filenames

    The grep command finds a specific searchstring in the specified file(s). If the search string is found, the command displays the line in which the searchstring was found along with the file name.

    -i

        Ignores case
    -l

        Only displays the names of the respective files, but not the text lines
    -n

        Additionally displays the numbers of the lines in which it found a hit
    -l

        Only lists the files in which searchstring does not occur




gzip :



gzip [parameters] file(s)

    This program compresses the contents of files, using complex mathematical algorithms. Files compressed in this way are given the extension .gz and need to be uncompressed before they can be used. To compress several files or even entire directories, use the tar command.

    -d

        decompresses the packed gzip files so they return to their original size and can be processed normally (like the command gunzip).





ifconfig :



ifconfig [-a] interface [[AF] address]

give you all of your network interfaces data even they up or down.

SIMPLE USE :ifconfig -a 


	-a	Display all network device(s), even if they down.
	up	Put interface up.
	down	Put interface down.




less :



less [option(s)] file(s)

    This command can be used to browse the contents of the specified file. Scroll half a screen page up or down with PgUp and PgDn or a full screen page down with Space. Jump to the beginning or end of a file using Home and End. Press Q to exit the program.




locate :



locate pattern(s)

    The locate command can find in which directory a specified file is located. If desired, use wild cards to specify file names. The program is very speedy, as it uses a database specifically created for the purpose (rather than searching through the entire file system). This very fact, however, also results in a major drawback: locate is unable to find any files created after the latest update of its database.




ls :



ls [option(s)] [file(s)]

    If you run ls without any additional parameters, the program will list the contents of the current directory in short form.

    -l

        detailed list
    -a

        displays hidden files

    -h

        displays files size in kilobytes




mkdir :



mkdir [option(s)] directoryname

    Creates a new directory.





mount :



mount [option(s)] [] mountpoint

    This command can be used to mount any data media, such as hard disks, CD-ROM drives, and other drives, to a directory of the Linux file system.

    -r

        mount read-only
    -t filesystem

        Specifies the file system. The most common are ext2 for Linux hard disks, msdos for MS-DOS media, vfat for the Windows file system, and iso9660 for CDs.

    For hard disks not defined in the file /etc/fstab, the device type must also be specified. In this case, only root can mount. If the file system should also be mounted by other users, enter the option user in the appropriate line in the /etc/fstab file (separated by commas) and save this change. Further information is available in mount.




mv :



mv [option(s)] sourcefile targetfile

    Copies sourcefile to targetfile then deletes the original sourcefile.

    -b

        Creates a backup copy of the sourcefile before moving
    -i

        Waits for confirmation, if necessary, before an existing targetfile is overwritten





nslookup :



nslookup

    The Domain Name System resolves domain names to IP addresses. With this tool, send queries to information servers (DNS servers).




ping :



ping [option(s)] host name|IP address

    The ping command is the standard tool for testing the basic functionality of TCP/IP networks. It sends a small data packet to the destination host, requesting an immediate reply. If this works, ping displays a message to that effect, which indicates that the network link is basically functioning.

    -c

        number Determines the total number of packages to send and ends after they have been dispatched. By default, there is no limitation set.
    -f

        flood ping: sends as many data packages as possible. A popular means, reserved to root, to test networks.
    -i

        value Specifies the interval between two data packages in seconds. Default: one second.




ps :



ps [option(s)] [process ID]

    If run without any options, this command displays a table of all your own programs or processes — those you started. The options for this command are not preceded by hyphen.

    aux

        Displays a detailed list of all processes, independent of the owner.




rm :



rm [option(s)] file(s)

    Removes the specified files from the file system. Directories are not removed by rm unless the option -r is used.

    -r

        Deletes any existing subdirectories
    -i

        Waits for confirmation before deleting each file.




rmdir :(rm work to for directory)



rmdir [option(s)] directoryname

    Deletes the specified directory, provided it is already empty.





tar :



tar options archive file(s)

    The tar puts one file or (usually) several files into an archive. Compression is optional.

    tar is a quite complex command with a number of options available. The most frequently used options are:

    -f

        Writes the output to a file and not to the screen as is usually the case
    -c

        Creates a new tar archive
    -r

        Adds files to an existing archive
    -t

        Outputs the contents of an archive
    -u

        Adds files, but only if they are newer than the files already contained in the archive
    -x

        Unpacks files from an archive (extraction)
    -z

        Packs the resulting archive with gzip
    -j

        Compresses the resulting archive with bzip2
    -v

        Lists files processed




top :



top [options(s)]

sudo apt install htop


htop is evoluated version of top.




unmount :



umount [option(s)] mountpoint

    This command unmounts a mounted drive from the file system. To prevent data loss, run this command before taking a removable data medium from its drive. Normally, only root is allowed to run the commands mount and umount. To enable other users to run these commands, edit the /etc/fstab file to specify the option user for the respective drive.




zip :



zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]


Like windows os, to compress documents.

OR SIMPLY :

	zip file_to_be_zipped.zip file_you_want_zip.txt(.jpg)(.php)...


  The default action is to add or replace zipfile entries from list, which can include the special name - to compress standard input.


  -f   freshen: only changed files  -u   update: only changed or new files
  -d   delete entries in zipfile    -m   move into zipfile (delete OS files)
  -r   recurse into directories     -j   junk (don't record) directory names
  -0   store only                   -l   convert LF to CR LF (-ll CR LF to LF)
  -1   compress faster              -9   compress better
  -q   quiet operation              -v   verbose operation/print version info
  -c   add one-line comments        -z   add zipfile comment
  -@   read names from stdin        -o   make zipfile as old as latest entry
  -x   exclude the following names  -i   include only the following names
  -F   fix zipfile (-FF try harder) -D   do not add directory entries
  -A   adjust self-extracting exe   -J   junk zipfile prefix (unzipsfx)
  -T   test zipfile integrity       -X   eXclude eXtra file attributes
  -y   store symbolic links as the link instead of the referenced file
  -e   encrypt                      -n   don't compress these suffixes
  -h2  show more help




Linux_Tux_penguin

Date 2019/12/10 & Unix Epoch 1576011515

this website is made with nano editor!
CSS framework taken from w3schools.com, easily customisable, it make magic!