Linux series Part-3
Linux!!!
Hi everyone, hope you all reading and getting at least some knowledge from our blog pages. We keep posting the stuff. Thanks for your love.
##You should be careful with the spaces between the commands. If not, it just throws you an error.
In this article, you will learn about handy commands like whatis and apropos. Some commands every Linux user must know are explained in a friendly manner. We had given the file names and directory names also as you don’t need to think of new names. Try those commands, you will get an idea of executing commands.
Before reading this article, refer to our previous posts.
https://devundertree.medium.com/linux-series-part-1-6877927520dc — Linux series part-1
https://devundertree.medium.com/linux-series-part-2-812f7182a9ba — Linux series part-2
let’s go…
whatis command: It displays one-line manual page descriptions. See the picture below. Try out for other commands.
apropos command: If you don’t know the command to start with and which man page to read, the co31mmand apropos is available to give you the related commands which are matched with the command you entered. See the picture below.
Some commands you should be thorough:
Try these commands in your Linux Command Line Interface (CLI) with available options to attain some knowledge about the usage of commands. Whatever the command, Learn from the man, help, info pages, etc. about that command.
These commands are useful when you are executing file management, User management, Filtering, and Programming with Linux, File security, Networking, etc. Not only managing but also every user should know these commands.
## Some examples are explained in this blog.
ls: Listing directory contents with sorting.
pwd: prints the current working directory.
cd: Changing directory.
man: Display manual pages about a particular command.
mkdir: Create directories, can create multiple directories at a time, and can create nested folders.
Ex. mkdir dev1 #Creating directory
mkdir dev2 dev3 dev4 #Creating multiple directories
mkdir -p dev/{u1/{v1,w1} u2/{v2} u3} #Creating nested directories
rmdir: Remove empty directories and can remove the multiple directories at a time.
Ex. rmdir dev1 #Removing empty directory
mv: Moving the files from the current path to a new path
Ex. mv current_directory new_directory #Moving files
cp: To copy a file. Use -r option, if to copy the directory contents.
Ex. cp f1 f3 #Copying files
cp f1 /D1 #Copying file to directory
cp -r /D1 D2 # Copying directories
rm: To remove a file
Ex. rm f3 # Removing file
rm -r dev # Removing directory
file: Determines the file type whether ASCII text, bash script, etc.
Ex. file f3 # Tells you the type of file.
touch: Creates an empty file
Ex. touch f2 # Creates an empty file named f2
clear: Clears the terminal.
Ex. clear
nano: It is an editor without modes so that beginners can type characters directly, the file can be edited.
Ex. nano file_name #opens nano editor to write
vim: The file can be edited using this editor especially by programmers.
Ex. vim file_name #opens vim editor to write
emacs: The file can be edited using this editor and it is regarded as an awesome editor in Unix systems.
Ex. emacs file_name #opens emacs editor to write
Tip: If you don’t know the appropriate usage of the command, do apropos or whatis. These commands will tell you about the given command.
Next week, you will learn some more commands. stay connected ❤