What is Linux?

SHEEL SACHANIASHEEL SACHANIA
3 min read

From desktops to supercomputers, Linux is everywhere!

Just like Windows and Mac, it is an operating system and has been around since the 1990s. Linux is basically a Unix-like, Kernal-based, fully-memory-protected, multitasking operating system. It is open-source software that runs on a wide range of hardware, from PCs to even Macs.

What are Linux Commands?

A command is a program that interacts with the kernel to provide the environment and perform the functions called for by the user. A command can be:

  • a built-in shell command

  • an executable shell file, known as a shell script

  • a source compiled, object code file.

Basic Linux Commands

ls

Lists all files and directories in the present working directory

ls -R

Lists files in sub-directories as well

ls -a

Lists hidden files as well

ls -al

Lists files and directories with detailed information like permissions, size, owner, etc.

cd or cd ~

Navigate to the HOME directory

cd ..

Move one level up

cd

To change to a particular directory

cat > filename

Creates a new file

cat filename

Displays the file content

mv file "new file path"

Moves the files to the new location

sudo

Allows regular users to run programs with the security privileges of the superuser or root

rm filename

Deletes a file

man

Gives help information on a command

clear

Clears the terminal

mkdir directoryname

Creates a new directory in the present working directory or an at the specified path

rmdir

Deletes a directory

mv

move files and directories from one directory to another or rename a file or directory

apt-get

Command used to install and update packages

File Permission commands

ls -l

to show file type and access permission

r

read permission

w

write permission

x

execute permission

-=

no permission

Chown user

For changing the ownership of a file/directory

Chown user:group filename

change the user as well as a group for a file or directory

User management & Networking commands of Linux

sudo adduser username

To add a new user

sudo passwd -l 'username'

To change the password of a user

sudo userdel -r 'username'

To remove a newly created user

Ping hostname="" or =""

To ping and Analyze network and host connections

dir

Display files in the current directory of a remote computer

cd "dirname"

change the directory to “dirname” on a remote computer

put file

upload ‘file’ from a local to a remote computer

get file

Download the ‘file’ from the remote to the local computer

quit

Logout

Conclusion

I hope you guys find it useful, you'll surely find these commands easy in no time!

0
Subscribe to my newsletter

Read articles from SHEEL SACHANIA directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

SHEEL SACHANIA
SHEEL SACHANIA