Linux Basic commands for beginners

#
Command Text
Description
1
Cd /
Go to root
2
Ls
Show all folder file directory names

Ls  -l
Show file permissions
3
Cd
Change directory

Cd ..
Go back one step
4
Mkdir directory-Name
Create directory
5
Touch app.txt
Create file
6
Vi app.txt
Edit file (vi default editor),
7
Insert mode
Press I to insert mode, escape to out
8
Cat app.txt
Show/print content
9
Cp app.txt  /home/faizan/desktop
Copy file to specific director
10
Mv file name directory
Cut paste
11
Rm file name
Delete
12
Man command name
Help how command work
13
Find search-path “filename with extension”
Find command for file
14
Find search-path -name “filename with extension or directory”
Search directory of file
15
Uname
OS name returning
16
Uname –a
OS architecture or process architecture details
17
Lscp
CPU speed and numbers
18
Df h
Disk space, how much disk space acquired, h for human readable
19
Du directory
Specific directory contains how many file with each size
20
Du -s directory
Specific directory contains how many file with total size for total file
21
date
Show date
22
Cal
Show Calendar
23
W
Who is online login
24
Apt-get install package-name
Install package name
25
Apt-cache search keyword
Search specific package
26
Info

27
Type command
Command file location
28
Bg
Background service
29
Free (free –h)
How much memory free and use
30
Ps
Running process shows
31
Kill process id
Kill process by id
32
Nice
Set Low priority program
33
Top
Show all process with memory usage
34
Su -
Switch root in the shell.
Go to root, ask password.
35
shutdown

36
Sudo us
To enter in root user
37
Sudo Apt-get install package-name
 Gain all privileges for normal user
38
Chmood permission-integers file-name
Grant permission
39
Uptime
How much time for up
40
uname -srv

41
Alias myfile=”touch myfile.txt”
Create my file whenever I write myfile inn terminal
42
Unalias myfile

43
Sudo useradd user-name  –m
Create user with name
44
Sudo passwd user-name
Confirm password
45
Sudo userdel user-name –r
User deleted
46
Info command-name (info ls)
Get command online details
47
Whatis command-name
Short description of command



Post a Comment

0 Comments