0% found this document useful (0 votes)
44 views5 pages

Class 4 Basic Command Par 2

This document provides commands for basic Linux system information and administration. Some key commands include: - uname - to view kernel information - hostname - to view or temporarily set the system name - uptime - to view system uptime and load averages - free - to view memory usage - lsblk - to view block devices and partitions - find - to search for files and directories on the system

Uploaded by

subodh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views5 pages

Class 4 Basic Command Par 2

This document provides commands for basic Linux system information and administration. Some key commands include: - uname - to view kernel information - hostname - to view or temporarily set the system name - uptime - to view system uptime and load averages - free - to view memory usage - lsblk - to view block devices and partitions - find - to search for files and directories on the system

Uploaded by

subodh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Class 4

Basic command

27. check current user name

Logname or whoami

28. see the kernel name

Uname

29. see the kernel version

Uname -r

30. see the kernel release date

Uname -v

31. see the hostname

Hostname

32. change the name temporary

Hostname cloudserver

Bash

33. change the name permanent

Nmtui = network manager terminal user interface

Bash

34. see the hardware platform

32 bit = x86 (max - 4GB) , 64 bit =x86_64 (max 16 TB)

Uname -i

35 see the processor bit

Uname -p

36. see the OS name

Uname -o or cat /etc/redhat-release

37. see the all info

Uname -a

38. see the date and time

Date or timedatectl

39. change the date and time

Date -s “30 may 2025 3:30:45”

40. open the calculator


Bc =basic calculator

Ctrl+d

41. see the calculator version

Bc -v

42. see the server uptime and load

Uptime

03:33:02 up 40 min, 1 user, load average: 0.01, 0.01, 0.01

03:33:02 = time

up 40 min, = uptime

1 user,

load average: 0.01, 0.02, 0.05 = 0.01 = last 1 min load , 0.02 = last 10 min load , 0.05 = last 15 min load

43. see the command file

Which mkdir

44. help command

Man mkdir or mkdir --help

45. see the full of file and directory

Ls -l or ll (long listing)

drwxr-xr-x. 2 root root 6 May 30 03:37 ducat

d = directory , - = file , l =softlink , c = character device (processing device = cpu , RAM ) , b =block device (hard
disk , PD , CD , DVD)

rwxr-xr-x = permission

. = + = acl

2 = sub folder

Root = owner

root = group

6 = size in byte

May 30 03:37 = creation date and time

Ducat = name

46.see the size of file / folder

Du -sh name

47. see the current month and year calendar

Cal
48. see the whole year calendar

Cal 2050

49. see the specific month and year calendar

Cal 4 2000

50. shutdown the server

Init 0 or shutdown -p now or halt -p or poweroff or telinit 0

51. restart the server

Init 6 or reboot or shutdown -r

52. see the data slowly

Cat /etc/passwd | less

53. see the data slowly

Cat /etc/passwd | more

Less down , up

More = down

54. catch the specific word in a output

Grep root /etc/passwd or cat /etc/passwd | grep root

55. see the data inverse

Tac test

56. see the 10 line from of a file from top

Head /etc/passwd

57. see the 5 line from top

Head -n 5 /etc/passwd

58. see the 10 line from bottom

Tail /etc/passwd

59. see the 4 line from bottom

Tail -n 4 /etc/passwd

60. see the last line of file

Tail -f /etc/passwd

61. see the RAM info

Free -h

62. see the CPU

Lscpu
63. see the harddisk and partition

Lsblk (list block)

64. search the file and folder

Find / -name passwd

65.search only file

Find / -name passwd -type f

66. search only directory

Find / -name passwd -type d

67. ignore the case sensitivity

Find / -iname passwd

68. search empty data

Find / -empty

69. search the data from extension

Find / -name “*.mp3”

70. search exact 10 M data

Find / -size 10M

71. search less then 10M

Find / -size -10M

72. search more then 10M

Find / -size +10M

73. search modified data with in 20 min

Find / -mmin 20

Find / -mmin -20

Find / -mmin +20

74. modified in 4 days

Find / -mtime 4

75. see the shutdown and restart time

Last -x

76. see the restart time

last

You might also like