Linux commands

 0    26 schede    starakoza
Scarica mp3 Stampa Gioca Testa il tuo livello
 
Domanda Risposta
man
inizia ad imparare
command for help
> man grep
ls
inizia ad imparare
List directory contents
-l long listing (ls -l),-al (ls -al) Listing With Hidden Files
grep
inizia ad imparare
Find text in a file
grep PATTERN [FILE], grep failed auth. log
cd
inizia ad imparare
Change current directory
Forward slashes instead of backward, cd /var/log
shutdown
sudo shutdown -r 2
inizia ad imparare
Safely turn off the computer in software
sudo shutdown 2 (turn off in 2min), -r restart, -c cancel or ctrl+c
pwd
inizia ad imparare
Displays the current working directory path
Useful when changing directories often
passwd
inizia ad imparare
Change a user account password
sudo passwd [username]
mv
mv SOURCE DEST
inizia ad imparare
Move a file
mv first. txt second. txt
cp
cp first. txt second. txt
inizia ad imparare
Copy a file
cp SOURCE DEST
rm
inizia ad imparare
Remove files or directories
Does not remove directories by default, -r (removes directory)
mkdir
mkdir DIRECTORY
inizia ad imparare
Make a directory
mkdir notes
chmod
r=read, w=write, x=execute
inizia ad imparare
Change mode of a file system object
chmod mode FILE, chmod 744 script. sh
chown
inizia ad imparare
Change file owner and group
sudo chown [OWNER: GROUP] file, sudo chown professor script. sh
iwconfig
inizia ad imparare
View or change wireless network configuration
ifconfig
inizia ad imparare
View or configure a network interface and IP
Slowly being replaced by ip (ip address)
ps
inizia ad imparare
View the current processes
ps -e | more (View all processes)
su / sudo
inizia ad imparare
Some command require elevated rights
There are some things normal users can’t do
su
inizia ad imparare
Become super user
You continue to be that user until you exit
sudo
inizia ad imparare
Execute a command as the super user
Only that command executes as the super user
apt-get
inizia ad imparare
Advanced Packaging Tool (Install, update, remove)
sudo apt-get install wireshark
vi
inizia ad imparare
Visual mode editor
Full screen editing with copy, paste, and more
dd
inizia ad imparare
Backup and restore an entire partition
dd if=<source file name> of=<target file name> [Options]
Creating a disk image
inizia ad imparare
dd if=/dev/sda of=/tmp/sda-image. img
Restoring from an image
inizia ad imparare
dd if=/tmp/sda-image. img of=/dev/sda
killall / kill <pid>
inizia ad imparare
Closing programs
sudo killall firefox
xkill
inizia ad imparare
Graphical kill
kill an app with one click

Devi essere accedere per pubblicare un commento.