Linux Basics/Basic commands

Root vs user permission

 * - root permission
 * - user permission

User can execute things with root permission that the user wouldn't do with base permission like, but using sudo does the same job as if you were in root. Linux Basics/User management (System administrator) chapter dives deeply into this topic.

Commands

 * : it will display all the switches for the command
 * : change directory (→ cd .. = it will go back by one folder/directory)
 * : print working directory – it'll display which folder you're in right now
 * : it shows who are logged in and what they are doing (w displays the particular user's activity)
 * : it displays only the tty interface, the date and ip address with the username
 * : listing files in a directory
 * : it lists all the hidden files aside the non-hidden ones
 * : same as previous, but it lacks . and .. (. means the current folder, .. means previous folder)
 * : detailed directory list
 * : based on the commands above: detailed directory list + hidden files with . and ..
 * : it'll quit the user from the shell and close the shell
 * : you can do commands as superuser
 * : move, moving from A to B: syntax: mv : midnight commander's command (you have to install it, because most distros don't contain mc by default)
 * : creating "file" named file
 * : "something" will be directed to the echo's standard output.
 * : editing "file" named file with nano (by default on some distros it's not installed, so you have to install it)
 * : outputting "file" named file to the terminal, but you can move in the word viewer, and you can quit from it by pressing q
 * : remove, delete
 * : recursive, so the rm command will delete everything that is given
 * : force, so without any arguments the folder will be deleted
 * : folder deletion, but rm -rf is simpler to delete a folder with files.
 * : connecting devices
 * : disconnecting devices
 * : creating link (hard-link)
 * : creating soft-link/symlink the differences between and softlink is written in Linux Basics/The structure of Linux chapter)
 * = disk free = it says how many free spaces are on each partition
 * = disk usage; you have to give parameters, else it's gonna list all the directories
 * : it's gonna list the content of /home and the usage of the folders
 * it says which folder and file how many kB, MB, GB does it take, if we won't put this, it's gonna list everything in bytes
 * summarizes (it takes every folder as one, and it'll write the sum of their size)
 * = free memory and swap space
 * (black and white) /  (color) = it displays the currently running apps (like Task Manager in Windows)
 * = displays info about the system, -a switch tells everything about the kernel

Output in Manjaro:


 * = it's gonna update your system's time based on the time server address you gave (like time.nist.gov => ntpdate time.nist.gov)
 * = how long have your system been running, and how much it's loaded
 * = network statistics
 * = It opens the manual pages of the command, short and straightforward description
 * = same as man, just it's more common in Red Hat systems

Network managemenent

 * = ip address, network settings, amount of sent and received packages
 * = same as ifconfig, just this is for wireless settings
 * (pinging an IP address) : ping www.google.com ; ping -c 3 www.google.com (we can give after the -c switch how much packets do we want to send to a page)
 * = interface up – it runs a script when it's enabled (e.g. ifup eth0 -> it enables eth0 interface)
 * = interface down – same as ifup, just here we disable the interface e.g. ifdown eth0
 * - interface status
 * – it monitors the upload/download speed of the interfaces

User management

 * / – user creation
 * – user deletion
 * - change mode - we can set the permissions for the files and directories(Linux Basics/Filesystem, permissions has more information on this)
 * – change owner
 * – modifying user

package management commands: dpkg, rpm, apt, yum, dnf, pacman, zypper stb.

Other commands

 * – clears terminal
 * – changing root folder
 * – killing/terminating process based on PID (ps -A displays that)
 * – kills every subthread
 * - kills the list's all elements but kill -9 @(...) is easier
 * - computer shuts down, but its PSU still goes(in case of ATX v2 PSUs)
 * /  – computer shuts down completely
 * – computer reboots –
 * – bash command prompt
 * – we can start/restart services running on the computer
 * – same as service
 * : computer does things without your input (in intervals, startups, shutdowns), cron daemon runs these (hourly, daily, weekly..)
 * : user's own cron setting
 * : editing crontab

/etc/skel folder: the content of this folder goes to the new user's home folder (skel = skeleton)

/etc/sudoers file: those users who can use sudo. (Linux Basics/Filesystem, permissions explains it in depth)