Linux commands

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

Vous devez vous connecter pour poster un commentaire.