In this post, you will learn some basic Linux command towards your journey of Linux mastery.
whoami (Print effective user id)
Brief Contents
For more information on whoami kindly refer to man page of whoami.
ls (This linux command displays infomation about files.)
ls -a /etc
This command includes all hidden filesnames
ls -ld /etc
This displays directory information without displaying their content
ls -l /etc
This command diplays the files in long listing format
ip a (Displays the IP address of the interface of the system)
cat (Display the content of text file)
passwd (This command changes the password of the user)
touch linux utility (It changes the file modification and access time)
touch file1
This command create a file named file1
touch -d "05 June 2022" file2
This command create a file named file2 habing time stamp of June 05
cp command utility (This command is used to copy one or more files)
cp file1 file2
This command copy the content of file "file1" to "file2"
cp -i file1 file2
This command ask for confirmation for overwrite while copying file "file1" to existing file "file2"
mkdir (This command is used to create directory)
mkdir dir1
This command create a directory named dir1
mkdir -p newdir/dir2
This command create both the directory named "newdir" and "dir2"
rmdir (This command deletes a directory)
mv (command to rename or move a file)
mv file1 file2
This command renames the filename of "file1" as "file2"
mv file2 dir
This command moves the file "file2" to directory dir
rm (This linux command removes a file)
rm -r dir
Recursively delete the content of the directory specified including the sudirectories.
rm -f dir
Forcefully removes a file
These were some of the basic linux command now for mastery you have to practice as practice makes a person perfect.
For more such Linux guide kindly visit Tuxstudy.