Last active
December 15, 2015 15:09
-
-
Save linkarys/5279286 to your computer and use it in GitHub Desktop.
ubuntu: directives
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Commands: | |
1. pwd: print working directory | |
2. ls: list [ -s | -sh | -h] | |
3. cd { | |
root: cd / | |
home: cd or cd ~ | |
up: cd.. | |
back: cd - | |
} | |
4. cp: copy [-r] | |
5. rm: remove | |
6. mv: move | |
7. rmdir: remove directory (only empty) [-r] | |
8. mkdir: make directory | |
9. man man || info io | |
10. date -s: { | |
directive: { | |
date nnddhhmmyyyy.ss | |
date nnddhhmmyy.ss | |
date nnddhhmm | |
date nnddhhmm.ss | |
} | |
------------------------------------------------------- | |
nn with two digit month (e.g. 01, 05, 12) | |
dd with two digit day (e.g. 02, 24, 31) | |
hh with two digit hour in 24 hour clock format ( 00, 03, 23) | |
yy/yyyy with the year in two digit or four digit (optional) | |
} | |
11. blkid: view disk information | |
12. fdisk -l: disk infor | |
13. gedit /etc/fstab: settings of system mount | |
14. change password { | |
self: passwd | |
other: passwd username | |
} | |
15. update sources list: sudo gedit /etc/apt/sources.list | |
16. auto start: sudo gedit /etc/rc.local | |
17. update: sudo apt-get autoclean & sudo apt-get update | |
18. change folds mode: find /path/to/fold -type d -print0 | xargs -0 sudo chmod 755 | |
------------------------------------------------------- | |
install tar.gz { | |
tar -zxf [xx].tar.gz | |
cd [xx] | |
./configure | |
make | |
sudo make install | |
} | |
unpack tar.gz: { | |
tar -zxvf FileName.tat.gz -C/specif dir | |
} | |
install tar.bz2 { | |
tar -jxvf FileName.tar.bz2 | |
cd [xx] | |
./configure | |
make | |
make install | |
} | |
install deb { | |
sudo dpkg -i xxxx.deb | |
} | |
install rpm { | |
sudo apt-get install alien | |
sudo alien xxx.rpm #convert rmp to deb | |
install deb | |
or | |
rpm -ivh FileName.rpm | |
} | |
------------------------------------------------------- | |
-s: Summary | Size | |
-h: Human Readable | |
-r: Recursively | |
-f: File | |
-d: Directory | |
-m: Using Megabytes | |
-------------------------------------------------------- | |
1. df: display filesystem [-h] | |
2. du: display usage for a directory [-h] | |
3. free: display free amount of memory [-m] | |
4. top: display rrunning processes | |
--------------------------------------------------------- | |
Add New User: | |
adduser newuser | |
passwd newuser | |
================================================== | |
Very Userful: | |
tab: auto complete | |
ctrl + r: search commands | |
ctrl + a: start of line | |
ctrl + e; end of line | |
ctrl + shift + c: copy commands | |
ctrl + shift + p: paste commands | |
ctrl + k: deletes from the current cursor to end | |
ctrl + u: deletes from the current cursor to start | |
ctrl + w: deletes word before the cursor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment