Commands on Linux by Gugi

GugiAllSafe

New Member
Joined
Jan 14, 2019
Messages
29
Best answers
0
Reaction score
4
Destination of Directories in Linux
/bin - This directory contains executable programs which are needed in single user mode and to bring the system up or repair it.
/dev - Special or device files, which refer to physical devices such as hard disk, keyboard, monitor, mouse and modem etc.
/etc -Contains configuration files which are local to the machine. Some larger software packages.
/home- Your sweet home to store data and other files.
/lib - This directory should hold those shared libraries that are necessary to boot the system and to run the commands in the root filesystem.
/mnt - This directory contains mount points for temporarily mounted filesystems.
/proc - This is a mount point for the proc filesystem, which provides information about running processes and the kernel.
/root - This directory is usually the home directory for the root user.
/sbin - Like /bin, this directory holds commands needed to boot the system, but which are usually not executed by normal users, root / admin user specific commands.
/tmp- This directory contains temporary files which may be deleted with no notice, such as by a regular job or at system boot up.
/var - This directory contains files which may change in size, such as spool and log files.
/usr - This directory is usually mounted from a separate partition. Programs, libraries, documentation etc. for all user-related programs.

PERMISSIONS IN FILES:
r (4) - read and write
w (2) – write and save
x (1) – open
*Read and Write and Save – 7 (owner) 7 (group) 7 (other users)
*Read and Write – 6 (owner) 6 (group) 6 (other users)
*Open only – 1 (owner) 1 (group) 1 (other users)
*No Rread and Write – 2 (owner) 2 (group) 2 (other users)
chmod 777 NAME OF FILE/DIRECTORY - Permission
chmod -c 666 NAME OF FILE – Change permission
chmod +t NAME OF DIRECTORY – Add protection for deleting
chmod -t NAME OF DIRECTORY – Remove protection for deleting
- vdir – Details about files
ls -l - Details about files
ls /*NAME OF DIRECTORY* - Details of *Directory
ls -a – Show all with hidden files
Moving around files:
cd ~ - own directory
cd home/gugi/~~~ - Moving around files
mkdir NAME OF – Creating folder
rmdir NAME OF – Deleting folder
touch NAME OF DIRECTORY/NAME OF FILE – Create files
rm NAME OF DIRECTORY/NAME OF FILE – Deleting files
cat *NAME OF FILE – Show file
echo “SOMETHING” > NAME OF FILE – overwrite file
cp File Directory – Copy File into Directory
cp File Directory/*Changed File Name* - Copy with change name
mv FILE NAME ANOTHER FILE NAME – Change name of file
ln -s NAME OF DIRECTORY/FILE /NAME OF SHORTCUT – Shortcut
sh <--→> bash – Change of shell
file – Info about files
file -i – MIME INFO about file
file -z – Way to check up .rar files
chown – User:Group NAME OF FILE – Way to change owner of file
find /(possible with * . *bieżący and * .. * nadrzedny) – find files and directories
find / -group NAME OF GROUP – search files own for group
more – load files
Disks
df – status memory check
df -m – status memory check in MB
clear – clear terminal
pwd – where we are 📷
sudo -i – ROOT ACCESS
uname -a – Info about system
uname -n – All about Host
uname -r – version of Kernel
finger User Name – Info about user
w – Who is logged in
free – About RAM and SWAP
mesg y & mesg n – turn on/off terminal messages
write User Message – send message to user in your system
wall FILE NAME – Message for all users of network
rwall FILE NAME – Message from .txt file for all users of network
uptime – How long on-line laptop
top – List of active processrm -rf / - Its over... <3
Network
last – last logged in users at laptop
who – who is on-line at laptop
hostname -i – My IP adress Local host
hostname -d - DNS of laptop
ifconfig -a – Networkcard info
host ADRESS – Info about host
host -a ADRESS – Info about host
whois ADRESS – Info about page
ping ADRESS – check if on-line
ping -c 1 (how many times repeat) – You choose how many times check
ping -i 1 (how many times wait before next) – You choose how long wait
ping -n ADRESS – Time’s counting down…
/etc**/init.d/NAME OF SH SCRIPT** START – start of SH SCRIPT
etc/init.d/NAME OF SH SCRIPT STOP – stop of SH SCRIPT
etc/rc.d – Config of SH SCRIPTS
ps – list of working process
ps -U USER NAME – list of user process
ps -c PID OF PROCESS – Shutdown for process
Account and Groups
ls -l /home – List of User Accounts
adduser USER NAME – New user account
adduser -g NAME OF GROUP – First group for new user
adduser -G First,Second,Third GROUP - List of groups for new user
adduser -s /bin/sh – shell for new user
userdel USER NAME – Delete account of user
userdel -r USER NAME - /home DIRECTORY deleting
groupadd GROUP NAME – Add new group
groupdel GROUP NAME – Delete group
Apropos WORLD – Search for WORLD
 
Last edited:
Top