Sunday, February 24, 2013

Basic commands ubuntu




Here are some commands that can be used in the operating system Ubuntu in CLI mode, both Desktop and Server, which is also a lot to be used on another distro. In this example I'm using Ubuntu server 10.10.


1. sudo su 

Used to login as root / highest userSyntax sudo su

2. login 

Used to login as another user, but it must be a root used to be able to run this peirntah.Syntax: login usernameExample: adam login

3. CD 

Used to change directorySyntax: cd alamat_direktoriExample: cd / var / www

4. pwd 

Used to show in the directory where the position we are now.Syntax: pwd

5. ls 

Used to view the contents of a directory.Syntax: ls

6. cp 

Used to copy files.Syntax: cp / directory / file_yang_ingin_dicopy / destination directoryExample: cp / etc/file1.txt / var / www

7. mv 

Used to do a move, cut or rename the file.Syntax:mv / directory / file_yang_ingin_dicut / destination directory (cut)mv / directory / file_yang_ingin_direname / nama_baru_file (rename)Example:mv / etc/file1.txt / var / wwwmv / etc/file1.txt file2.txt

8. mkdir 

Used to create a new folder.Syntax: mkdir nama_folderExample: mkdir folder1

9. rmdir 

Used to delete the folder.Syntax: rmdir nama_folderExample: rmdir folder1

10. touch
 
Used to create a new file.Syntax: touch filenameExample: touch file1.txt

11. rm 

Used to delete the file.Syntax: rm file_nameExample: rm file1.txt

12. more 

Used to display the contents of a fileSyntax: more nama_fieExample: more file1.txt

13. echo 

Used to write something word or phrase to a file.Syntax: echo "message" file_nameExample: echo "Hi this is a sample message" file1.txt >>

14. adduser 

Used to add new users.Syntax: adduser nama_userExample: adduser adamkurniawan

15. addgroup 

Used to add a new groupSyntax: addgroup nama_groupExample: group1 addgroup

16. lsusb 

Used to see the usb device is connected to the computerSyntax: lsusb

17. lspci 

Used to see the pci devices that are connected to the computerSyntax: lspci

18. lshw 

Used to look at the computer hardware.Syntax: lshw

19. dmesg 

Used to view the current hardware activitiesSyntax: dmseg

20. top 

Used to see which processes are running, such as the Task Manager in Windows.Syntax: top

21. cpuinfo 

Used to see the computer specs.Syntax: more / proc / cpuinfo

22. meminfo 

Used to view the status of RAMSyntax: more / proc / meminfo

23. clear 

Used to clean the screenSyntax: clear24. haltUsed to turn off the computer, but it should be as root.Syntax: halt

25. reboot 

Used to restart the computer, but it must be as root.Syntax: reboot

26. exit 

Used to exit the terminal.Syntax: exit

27. wget 

Used to download via terminalSyntax: wget link_downloadExample: wget www.insightcalendar.com/Insight_Calendar_1-1_Setup.exe

28. ifconfig 

Used to view the configuration of ethernet / network card.Syntax: ifconfig

29. apt-get  

Used to obtain the package / software from ubuntu repository online.Sintax: apt-get package_nameExample:apt-get update (to update the repository)apt-get update wine (to get the wine package)

30. tar 

Used to do the extract file.Syntax: tar [parameter] file_nameExample: tar-xzvf komodo-edit-5.2.4-4343-linux-libcpp6-x86.tar.gz

31. nautilus 

Used to open the GUI directly.Syntax: nautilusExample: sudo nautilus (using GUI mode with root status)

32. df -h 

 see the remaining capacity of the hard disk.syntax: df-h

33. who

 used to seeing our login name.syntax: who

34. paint 

used to open the file.syntax: catexample: cat test.txt

35. date 

see the datesyntax: date

36. cal 

see the calendarsyntax: see the date

37. hostname 

Displays the name of the computer.syntax: hostname

38. free 

Viewed Free memory.syntax: free

39. History 

see what commands are never typedsyntax: History

40. deluser 

Remove users from the systemsyntax: deluser [user name]uname-r = Seeing kernel used in OSuname-a = Information system kernelcat / proc / cpuinfo = Viewing files in / proc directory is not a real file (not real files).cat / proc / interrupts = Seeing interrupt address is used.cat / proc / version = version of Linux and other information.cat / proc / filesystems = Viewing filesystem used.cat / etc / printcap = Viewing printers that have been set upfinger username = Viewing user information, try running; fingerrootlast = Seeing the previous user has logged on the computer.uptime = Seeing the amount of time the use of computers by one, starting the last reboot.ps (= print status) = Seeing processes run by the userps axu = View the entire process is run, although without a control terminal, also displayed the name of the user for each process.top = Viewing running processes, cpu usage order.apropos = To find commands on the operating system that have the same function.chmod = Change the permissions of a directory / file.wc = Count the number of words, number of lines and the number of characters in a file.man = Abbreviation of manual that is to display the manual pages for all UNIX commands.grep = Searching the contents of a file in any directory.pwd = Displays the name of your current directory where it was located.ps = Used to monitor information about active processes in the UNIX system.kill = Used to stop the running processes.bc = bc command can be used as a calculator.wall = Delivery of messages by the super user.: W used u / save file or equal to (save).: Q is used u / exit bunches mentimpan file editor.: Wq used u / exit the editor and save the file.tail = Displays 10 lines of a file.ls-l = List all files completels-a = Displays all hidden files or directoriesls-f = Displays all files or directories without the shortinggrep root / etc / passwd = Looking for a word or phrase in the file