- 1) 21 Basic Linux Commands every developer must know:
- 2) Cheatsheet
- 3) References
Most Useful Linux Commands For Developer Cheat Sheet Included
Basic Linux Commands: In 2019, it doesn’t matter which language you choose for development, every developer must know how to use Linux servers for build and deployment purposes. We have compiled a list of 20 most basic and useful Linux commands which every developer must know.
21 Basic Linux Commands every developer must know:
ls is the command used for listing all the files and folders in the directory.
ls -a displays all files including hidden files
ls -l display long detailed information of files which includes permission, date created, etc.
ls -lt displays detailed files sorted by last modified time at the top.
pwd prints the current directory.
cd directory_path change directory to the path provided.
mkdir directory_name makes a directory with the name provided.
rm file_name Remove the file with the name provided.
rm -r directory Remove the directory and its contents recursively.
rm -f file Force removal of the file without prompting for confirmation.
rm -rf directory Forcefully remove directory recursively.
cp source destination Copy source file to the destination.
cp -r source destinationCopy source_directory recursively to destination. If the destination exists, copy source_directory into the destination, otherwise create the destination with the contents of source_directory.
mv file1 file2 Rename or move file1 to file2. If file2 is an existing directory, move file1 into directory file2.
ln -s /path/to/file linkname Create a symbolic link to linkname.
touch file Create an empty file or update the access and modification times of the file.
cat file View the contents of the file.
cat > filename Quickly create/overwrite a file.
less file Browse through a text file.
head file Display the first 10 lines of the file.
tail file Display the last 10 lines of the file.
tail -f file Display the last 10 lines of the file and “follow” the file as it grows.
tail -nf file Display the last n lines of the file and follow the file as it grows.
ps Display your currently running processes.
ps -ef Display all the currently running processes on the system.
ps -ef | grep processname Display process information for processname.
top Display and manage the top processes.
kill pid Kill process with a process ID of pid.
killall processname Kill all processes named processname.
ifconfig -a Display all network interfaces and IP address.
ping host Send ICMP echo request to the host.
whois domain Display whois information for the domain.
tar cf archive.tar directory Create a tar named archive.tar containing directory.
tar xf archive.tar Extract the contents from archive.tar.
tar czf archive.tar.gz directory Create a gzip-compressed tar file name archive.tar.gz.
tar xzf archive.tar.gz Extract a gzip-compressed tar file.
tar cjf archive.tar.bz2 directory Create a tar file with bzip2 compression.
tar xjf archive.tar.bz2 Extract a bzip2 compressed tar file.
chmod options permissions filename changes file permission to assigned value.
chmod -R permissions directory changes directory permission to the mentioned value.
Basic Linux commands cheat sheet can be downloaded here.
[su_button url=”https://github.com/iPraBhu/ADevGuide/blob/master/Resources/linux%20cheatsheet.jpg” target=”blank” style=”3d” background=”#93ef2d” center=”yes” icon=”icon: download” download=”https://github.com/iPraBhu/ADevGuide/blob/master/Resources/linux%20cheatsheet.jpg”]Download CheatSheet[/su_button]