Linux commands

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

Você deve entrar para postar um comentário.