Linux commands

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

コメントを投稿するにはログインする必要があります。