Thursday, January 21, 2016

UNIX/Linux/Ubuntu system administration DAY 05

Information about CPU

$lscpu :displays information about CPU e.g. architecture, CPU op-modes, Byte order, CPU(s), thread(s) per core, core(s) per socket, vendor id, CPU family, Model, Model name, stepping, CPU MHz, BogoMIPS, Hypervisor vendor, L1d cache, L1i cache, L2 cache, L3 cache, etc.

$cat /proc/cpuinfo more information about CPU

Chipset, which is one or more chips that provide key functionality for the computer, handles the hard disk interfaces, the USB interfaces, the network devices, etc [1].

Information about Motherboard

$lspci :displays information about the Motherboard e.g. VGA controller, Ethernet controller, System peripheral, Multimedia audio controller, PCI bridge, IDE interface, SATA controller, ISA controller, USB controller, etc.

Running Programs

Programs in Linux systems are stored  in several locations, including /bin, /usr/bin, and /usr /local/bin.

Root uses programs that can be found in /sbin, /usr/sbin, and /usr/local/sbin.

$free :display information about the usages of memories.

$fg : return to the program after put the program in background mode.

$bg: run the program in the background.

$gedit : run the GUI text editor



Common file manipulation commands

1. cat
2. chgrp: change group ownership of a file.
3. chmod: change permissions of a file.
4. chown: change ownership of a file.
5. cp
6. echo
7. head
8. less: display a text file a screen at a time. We can move forward or backward through the file. Try: g and G when in less, try /OPTIONS to search for OPTIONS, try n key to find next.
9. ln: create links to files
10. ls
11. mkdir
12. mv
13. rm
14. pwd
15. rmdir
16. tail
17. wc: count characters, words, and lines in a text file.
18. history
19. rm -r newdir: delete newdir and anyfiles or subdirectories it might have.
20. man 5 passwd: returns information from manual section 5
21. man passwd: returns information from manual section 1
22. There are 9 sections in total.
23. whatis man: search summary information contained in man pages for the keyword "man".
24. apropos: search the manual page names and descriptions
25. xman: GUI for man command
26. info :read Info documents
27. diff -q folder1 folder2:display the differences between the contents of two folders.
28. fc a.txt b.txt compare the contents of two files in Windows.
29. ls -1 (number 1): list only the file names of the folder
30. ls -1 folder1 > folder1content.txt
31. ls -1 folder2 > folder2content.txt
32. diff folder1content.txt folder2content.txt :to compare the contents of two folders in UNIX
33. dir folder_name /b > folderContent.txt : save a list of file names to a text file.

References

[1] Roderick W. Smith, Linux essentials, Sybex, 2012.

No comments:

Post a Comment

Mounting USB drives in Windows Subsystem for Linux

Windows Subsystem for Linux can use (mount): SD card USB drives CD drives (CDFS) Network drives UNC paths Local storage / drives Drives form...