• QNAP Products
    • Qnap NAS – HOME and SOHO
    • Qnap NAS – Expansion
    • Qnap NAS – SMB Small Medium Business
    • Qnap NAS – Enterprise
    • Qnap NAS – Demo
  • Guides
    • Basic Linux Commands
    • How To Complete Reset / ReInstall Qnap
    • ISCSI Lun Recovery
    • Qnap Benchmark, Lun Speed & Stability Test
    • Qnap Data Recovery
    • Qnap Firmware Reflash / Recovery
    • Qnap Raid Recovery
    • What is Stress Test and How to Do Guide
  • Features
    • Cross-platform sharing
    • Windows Active Directory (AD)
    • Shared folder aggregation
    • ISO mount
    • Batch user upload
    • High-performance data sharing
    • FTP server
    • Web File Manager
    • Network service discovery
    • Web-based Distributed Authoring and Versioning (WebDAV)
  • FAQs
    • Cannot Access to Shared Folders
      • Qnapfinder Cannot Find My NAS
    • Filename Characters Are Corrupted
    • Forgot Admin Username and Password
    • Hard Disk Drive Error
    • How to Start / Stop Services on Qnap
    • ISCSI Luns are not exist under .@iscsi folder
    • Meaning Of Led Lights and Alarm Sounds
    • Qnap Becomes Unreachable When I Plug Qnap to My Network
    • Qnap ISCSI Problems & How to Fix
    • Qnap ISCSI Lun Lost and How to Restore
    • RAID System Errors
    • Reset Button Function
    • Stuck At Booting / Loading Drive Error
    • Warning : Re-Launch Process & The File System Is Not Clean
    • What is RAID? Redundant Array of Independent Disks
  • Contact Us
  • Locate Us

Call Win-Pro the IT Support Company in Singapore +65 6100 2100 Now

Find us on Map
salesenq@winpro.com.sg
Qnap Singapore NAS Network Attached Storage
  • QNAP Products
    • Qnap NAS – HOME and SOHO
    • Qnap NAS – Expansion
    • Qnap NAS – SMB Small Medium Business
    • Qnap NAS – Enterprise
    • Qnap NAS – Demo
  • Guides
    • Basic Linux Commands
    • How To Complete Reset / ReInstall Qnap
    • ISCSI Lun Recovery
    • Qnap Benchmark, Lun Speed & Stability Test
    • Qnap Data Recovery
    • Qnap Firmware Reflash / Recovery
    • Qnap Raid Recovery
    • What is Stress Test and How to Do Guide
  • Features
    • Cross-platform sharing
    • Windows Active Directory (AD)
    • Shared folder aggregation
    • ISO mount
    • Batch user upload
    • High-performance data sharing
    • FTP server
    • Web File Manager
    • Network service discovery
    • Web-based Distributed Authoring and Versioning (WebDAV)
  • FAQs
    • Cannot Access to Shared Folders
      • Qnapfinder Cannot Find My NAS
    • Filename Characters Are Corrupted
    • Forgot Admin Username and Password
    • Hard Disk Drive Error
    • How to Start / Stop Services on Qnap
    • ISCSI Luns are not exist under .@iscsi folder
    • Meaning Of Led Lights and Alarm Sounds
    • Qnap Becomes Unreachable When I Plug Qnap to My Network
    • Qnap ISCSI Problems & How to Fix
    • Qnap ISCSI Lun Lost and How to Restore
    • RAID System Errors
    • Reset Button Function
    • Stuck At Booting / Loading Drive Error
    • Warning : Re-Launch Process & The File System Is Not Clean
    • What is RAID? Redundant Array of Independent Disks
  • Contact Us
  • Locate Us

Basic Linux Commands

Viewing, copying, moving and deleting files

 ls Display the contents of the current directory
 ls -a Display also hidden files and hidden directories
 cp filename /path/dir_name Copy filename into directory /path/dir_name
 cp -r dir_name /path/dir_name2 Copy the entire dir_name into /path/dir_name2
 cp filename1 filename2 /path/dir_name Copy filename1 and filename2 into /path/dir_name
 rm name Remove a file or directory called name
 rm -r name Remove an entire directory as well as its included files and subdirectories
 mv filename /path/dir_name Move filename into /path/dir_name
 mv filename1 filename2 Rename filename1 to filename2
 cat filename Display filenames contents
 more filename Display filename in pages. Use spacebar to view next page
 head filename Display filenames first 10 lines
 head -15 filename Display filenames first 15 lines
 tail filename Display filenames last 10 lines
 tail -15 filename Display filenames last 15 lines
 pwd Display current directory
 cd /path/dir_name Change to directory /path/dir_name
 cd .. Go 1 directory up
 mkdir dir_name Create directory dir_name
 rmdir dir_name Delete directory dir_name

 

Finding files and text within files

updatedbUpdate (create first time used) a database ofall files under the root directory /
locate filenameFind file filename searching in the database
find / -name filenameStarting from the root directory search for the file called filename
find / -name *filenameSame as above but search for file containing the string filename
grep string /path/dir_nameStarting from /path/dir_name search for all files containing string
which application_nameSearch $path for application app_name
whereis application_nameSearch $path, man pages and source files for application_name

 

Archived files

Decompress

tar -xzf filename.tgzDecompress tzg file
tar -xzf filename.tar.gzDecompress tar.gz file
tar -xjf filename.tar.bz2Decompress tar.bz2 file

 Compress

tar -czf filename.tar /path/dir_nameCompress directory /path/dir_name to filename.tar
gzip -c filename > filename.gzCompress /path/dir_name to filename.tar.gz
bzip2 -c filename > filename.bz2Compress /path/dir_name to filename.tar.bz2

 

Using rpm files

rpm -hiv package.rpmInstall rpm called package.rpm
rpm -hiv –force package.rpmInstall rpm called package.rpm by force
rpm -hUv package.rpmUpgrade rpm called package.rpm
rpm -e package.rpmDelete rpm called package.rpm
rpm -qpil package.rpmList files in not-installed rpm called package.rpm
rpm -ql package.rpmList files in installed rpm called package.rpm
rpm -q strList installed rpms containing the string str
rpm -qf /path/application_nameDisplay the rpm that contains application application_name

 

 Starting and Stoping

startxStart the X system
shutdown -h nowShutdown the system now and do not reboot
haltSame as above
shutdown -r nowReboot
rebootSame as above
shutdown -r +10Reboot in 10 minutes

 

 Mounting filesystems

mount -t vfat /dev/sd(a)(1) /mnt/c_driveMount the first partition 1 of the first hard disk drive a which is in fat32 vfat dormat under /mnt/c_drive directory
mount -t iso9660 /dev/cdrom /mnt/cdromMount cdrom under /mnt/cdrom directory
umount /mnt/hda1Unmout the above

 

User Administration

usersDisplay users currently logged in
adduser usernameCreate a new user called username
passwd usernameDefine password for user called username
whoList logged-in users
whoamiDisplay current user
finger usernameDisplays info about user username
suLog in as root from current login
su –Log in as root from current login and take root’s path
exitExit from console login (ie, logout).

 

Processes

commandExecute command in the foreground
command &Execute command in the background
ctrl+zSuspend a program
ctrl+cInterrupt a program
psList all processes
kill -9 pidKill process with id pid
topMonitor processes in real time

 

Networking

hostnameList the system’s hostname
ifconfigSet/Display network information
host ipResolves ip’s hostname
ping ip/hostnameCheck if ip/hostname is reachable
traceroute ip/hostnameFind network path to ip/hostname

 

 System Information

uname -aGeneral system information
fdisk -lList partition tables
cp filename /path/dir_nameCopy filename into directory /path/dir_name
df -T -hList filesystem disk space usage
lspciList PCI devices
lsusbList USB devices
free -mDisplay RAM+Swap usage

 

 Program Compile

gcc -o output file.cCompile a C program
./outputRun a C program you have compiled
g++ -o output file.cppCompile a C++ program
./outputRun a C++ program you have compiled
./configure && make && su -c ‘make install’Configure, compile and install a program with Makefile

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CONTACT US!

Disclaimer: Win-Pro Consultancy is a reseller of QNAP Products. For Technical Support, please visit www.qnap.com

If you are interested in QNAP Products:
Hotline : +65 6100 2100 (SALES)
Phone Number : +65 6717 8729
Fax Number : +65 6717 5629

Address:
1003 Bukit Merah Central #05-17
Inno Centre
Singapore 159836

or allow us to contact you!

Contact Us

We're currently offline. Send us an email and we'll get back to you, asap.

Send Message

© 2023 · The IT Company (Since 1993) - Singapore - Win-Pro Consultancy Pte Ltd / Malaysia - WinProMy Consultancy Sdn Bhd

  • QNAP Products
    • Qnap NAS – HOME and SOHO
    • Qnap NAS – Expansion
    • Qnap NAS – SMB Small Medium Business
    • Qnap NAS – Enterprise
    • Qnap NAS – Demo
  • Guides
    • Basic Linux Commands
    • How To Complete Reset / ReInstall Qnap
    • ISCSI Lun Recovery
    • Qnap Benchmark, Lun Speed & Stability Test
    • Qnap Data Recovery
    • Qnap Firmware Reflash / Recovery
    • Qnap Raid Recovery
    • What is Stress Test and How to Do Guide
  • Features
    • Cross-platform sharing
    • Windows Active Directory (AD)
    • Shared folder aggregation
    • ISO mount
    • Batch user upload
    • High-performance data sharing
    • FTP server
    • Web File Manager
    • Network service discovery
    • Web-based Distributed Authoring and Versioning (WebDAV)
  • FAQs
    • Cannot Access to Shared Folders
      • Qnapfinder Cannot Find My NAS
    • Filename Characters Are Corrupted
    • Forgot Admin Username and Password
    • Hard Disk Drive Error
    • How to Start / Stop Services on Qnap
    • ISCSI Luns are not exist under .@iscsi folder
    • Meaning Of Led Lights and Alarm Sounds
    • Qnap Becomes Unreachable When I Plug Qnap to My Network
    • Qnap ISCSI Problems & How to Fix
    • Qnap ISCSI Lun Lost and How to Restore
    • RAID System Errors
    • Reset Button Function
    • Stuck At Booting / Loading Drive Error
    • Warning : Re-Launch Process & The File System Is Not Clean
    • What is RAID? Redundant Array of Independent Disks
  • Contact Us
  • Locate Us