List of usefull commands for Linux by Gugi

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
Gugi
Level 1
Level 1
Posts: 16
Joined: Sat Sep 29, 2018 11:45 am
Location: Somewhere in Poland
Contact:

List of usefull commands for Linux by Gugi

Post by Gugi » Sat Oct 06, 2018 8:34 am

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

Details about files and directories:
. - Katalog bieżący
.. - Katalog nadrzędny
- 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 process

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
Image

REGARDS,
Gugi

Post Reply

Return to “Tutorials”