Linux commands

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

Kommentár közzétételéhez be kell jelentkeznie.