Search This Blog

Friday, May 17, 2024

Linux

hostnamectl


only display on screen


for u in user{1..5} ; do

> echo $u

> done


actually create them in system


for u in user{1..5} ; do sudo useradd $u; echo "Password1" | sudo passwd --stdin $u; done


to delete the above created users 


for u in user{1..5} ; do sudo userdel -r $u;done


history

history 5



file commands

============

touch CloudComputing


ll

full details


ls

only filenames


touch devops aws azure gcp


ll

ls

ll follow alphabetic order



touch aws{1..7}

touch aws{1.3} creates only one file as its single .


touch filename

touch f1 f2 f3

touch filename{1..10}


all files in linux will be created in text format


to delete files

rm file1

y


ls


rm f1 f2 f3

y y y


clear


ctrl+l also clears the screen