Kumpulan perintah penting di Ubuntu

Ini dia kumpulan perintah perintah penting di ubuntu/Linux. Lumayanlah kalo semuanya bisa di hafal :)) Tapi sebelumnya alangkah baiknya kalo buka google translate dulu buat yang tidak terlalu mahir bahasa inggrisnya karna artikel ini berisikan bahasa inggris hehe.. atau biar lebih mudah install saja paket bawaan ubuntu untuk translate seperti virtaal..cara installnya sudo apt-get install virtaal Add a user sudo adduser USER_NANE Delete a user sudo deluser USER_NAME Change user password sudo passwd USER_NAME Changes user fullname, office number, office extension, and home phone number information. sudo chfn USER_NAME Display user information finger USER_NAME Temporarily prevent a user from logging in sudo usermod -L USER_NAME Revoke the operation above sudo usermod -U USER_NAME Add a user to admin group

sudo usermod -G admin -a USER_NAME Clear ash history histor -c Display !inux distributor"s #D ls!_release -is Display !inux release number ls!_release -rs Display !inux code name ls!_release -cs Display machine hardware name uname -m !ist all $C# devices. such as display card and ethernet card. dentries and inodes echo " # $proc$s s$vm$drop_caches Display a list of modules in the !inux %ernel lsmod !ist &' devices lsus! -v Display the status of ethernet card sudo ethtool eth% !ist hardware sudo lshw !ist harddisk partitions sudo fdis& -l Display 'ATA harddisk parameters . lspci Reclaim memory which stores pagecache.

/% Configure an AD'! connection sudo pppoeconf .R)-ESS_NAME !ist files which are opened by a given process lsof -p .R)-ESS_'* Terminate all processes with a given name sudo &illall .R)-ESS_'* lsof -c .R)-ESS_NAME !ist processes which opened a given file lsof ('LE_NAME !ist processes which are using port )* lsof -i .sudo hdparm -' $dev$sda Display disk space usage df -h Display file(folder space usage du -!sh ()L*ER_NAME Display amount of free and used memory free Display processes ps -e Display a tree of processes pstree Display processes dynamically top Terminate a process with a given process id sudo &ill -+ .

)R6 .R)895*)MA'N5NAME.11._A**RESS Display .33 Display information of a domain name whois e4ample5com Display the network path to a given host tracepath e4ample5com Re.uest an #$ address from D/C$ server sudo dhclient Temporarily restart an init script sudo $etc$init5d$S-R'.'tarts up AD'! connections sudo pon 'huts down AD'! connections sudo poff Display +AC of a given #$ address arping '.6_NAME stop 'et the /TT$ proxy e4port http_pro4 7http..22._A**RESS Display #$ address and +AC ifconfig -a Display route netstat -rn 'et +AC of ethernet interface sudo ifconfig eth% hw ether %%.et #-' name of a given #$ address nm!loo&up -A '."".6_NAME restart Temporarily stop an init script sudo $etc$init5d$S-R'.$$.00.

m&dir -p $tmp$a$!$c$d$e .5t4t: Create two empty files touch file_name_0 file_name_1 Create directory.A6BNAME Display all ". . Create parent directories as needed.txt" file find 5 -name :. ('LE_NAME Display a list of file name. grep -lr REG_E8.mp5" from 2 % to &T3) find 5 -name :.+odify the information displayed after logging in sudo vim $etc$motd5tail Choose the input method for 0 1indow im-switch -c Convert the file name from 2 % to &T3) convmv -r -f g!& -t utf/ --notest ('LE_NAME Convert the file content from 2 % to &T3) iconv -f g!& -t utf/ ('LE_NAME Convert tags in "4. The files contain a given string.5mp": -e4ecdir mid"iconv -e G<= >? @A Read a long file less ('LE_NAME $rint lines matching a pattern grep REG_E8.

rm" files to "4. Display subdirectories in current directory ls -d . $reserve links.rmvb" files rename :s$5rmE$5rmv!$: . timestamps.A6B Rename "4. Change the file name to lowercase rename :tr$A-F$a-G$: . ownership. file mode.g98 file gunGip ('LE_NAME5gG 7xtract 84.tar.g98 file tar G4f ('LE_NAME5tar5gG . cp -a S)UR-E_*'RE-6)R9 *ES6_*'RE-6)R9 Determine file type file ('LE_NAME -utput the last 6 lines tail -n C ('LE_NAME Copy files via ''/ scp -rp ('LE_NAME USERNAMEDB)S6.$5 Display file number in current directory ls 5 H wc -w 7xtract 84.*ES6_.Change working directory to the home folder cd Change working directory to the previous working directory cd Display hidden files ls -a Copy directory.

desktop" files into :K$5config$autostart: <ou can configure 8preferred applications8 by this file 8=(.b9:8 file tar I4f ('LE_NAME5tar5!G1 Do compression tar cGf ('LE_NAME5tar5gG ('LE0 ('LE1 ('LE" tar cIf ('LE_NAME5tar5!G1 ('LE0 ('LE1 ('LE" Displays a calendar cal cal M)N6B 9EAR 'et the date and time via .$$e4ample5com . please put ".** sudo shutdown -h 1".T$ sudo ntpdate ntp5u!untu5com $oweroff your computer sudo halt sudo shutdown -h now $oweroff your computer in :5.tar.%% $oweroff your computer after 6* minutes sudo shutdown -h JC% Reboot your computer sudo re!oot sudo shutdown -r now #f you want some program to start up automatically.local(share$applications$mimeapps5listL Continuously monitor the memory usage watch -d free Display /TT$ /7AD response w"m -dump_head http.7xtract 84.

Display file content with line number nl ('LE_NAME 7liminate Rootkit sudo r&hunter --chec&all Change hostname sudo hostname new_name 8Tasksel8 group software packages into 8task8s. to free disk space.R')R'69 Npgrep NAME_)(_. #t contains thumbnail pictures of picture files you"ve previously looked at.R')R'69 7 -0+P -0/P -0Q R555S 0/P 0+P 1% =(. 'how all tasks tas&sel --list Display the extended description of a task tas&sel --tas&-desc lamp-server !ist the packages which are parts of a task tas&sel --tas&-pac&ages lamp-server #nstall(remove a task g&sudo tas&sel Change $rocess priority renice NEM_.<ou can get its total si9e by du -!s K$5thum!nails$ <ou can delete the files in the .-+7 makes when you browse through your folders in nautilus.thumbnails( directory is a cache dir 2. renice 3 Npgrep firefo4N renice -3 Npgrep wine-serverN high O------------------# low NEM_. #t is easy to set up !A+$ servers or cloud computing servers. <ou can select a 8task8 and then install all necessary software packages.R)-ESSN e4ample.thumbnails directory that haven"t been accessed for seven days. find K$5thum!nails$ -t pe f -atime JQ -e4ec rm >? @A Capture screen after >* seconds .

apt-cache search REG_E8. The files are installed from a given package. The name of packages matches given regex pattern. . apt-cache rdepends .)S'6)R9-NAME Display a list of files.. dp&g -S ('LE_NAME Display a list of packages. The packages provide a given file. sudo add-apt-repositor ppa.A-=AGE_NAME Display a list of packages. dp&g -L . The given package depends on the list of packages.. The packages installed a given file.ress AltJ(1P t pe :gconf-editor:5 'et apt source sudo software-properties-gt& sudo software-properties-&de Display the packages which are not installed but have remained residual config dp&g -l H aw& :$Trc$ >print E1?: Add a $$A repository. sudo apt-cdrom add .A-=AGE_NAME Display a list of packages. apt-file search ('LE_NAME Display a list of packages. apt-cache depends .RESS')N Display a list of packages.A-RE. These packages depend on the given package.gnome-screenshot -d 0% Capture current window after >* seconds gnome-screenshot -wd 0% 'tart 2Conf editor.A-=AGE_NAME $rompt for a disk to be inserted and then add the disc to the source list.

A-=AGE_NAME .A-=AGE_NAME Display some statistics about the apt cache apt-cache stats Display all package name apt-cache p&gnames Display some information of a given package apt-cache show .(configure ? make ? make install" sudo auto-apt run 5$configure 'ave the list of packages currently installed on your system. dp&g --get-selections H grep -v deinstall # S)ME_('LE Then use the file to restore packages. sudo apt-get clean Display &R! for a given package apt-get -UU --print-uris install . dp&g --set-selections O S)ME_('LE A sudo dselect After running 8sudo apt@get install8.deb8 files are stored in 8(var(cache(apt(archives8 <ou can clean this directory by.#nstall the newest versions of all packages currently installed on the system. sudo apt-get upgrade Delete residual package configuration files. Automatically install necessary files for ". 84. dp&g -l H grep Trc H aw& :>print E1?: H sudo 4args dp&g -.

Sign up to vote on this title
UsefulNot useful